<rt id="bn8ez"></rt>
<label id="bn8ez"></label>

  • <span id="bn8ez"></span>

    <label id="bn8ez"><meter id="bn8ez"></meter></label>

    paulwong

    #

    防止在SPRING BOOT的配置文件中使用明文存儲密碼

    Spring Boot how to hide passwords in properties file
    https://stackoverflow.com/questions/37404703/spring-boot-how-to-hide-passwords-in-properties-file

    工作隨筆——jasypt-spring-boot使用
    https://www.cnblogs.com/zz0412/p/jasypt-001.html

    Get史上最優雅加密方式!沒有之一!
    https://www.jianshu.com/p/64ceda636e81

    使用Jasypt對SpringBoot配置文件加密
    https://www.jianshu.com/p/323ec96c46d2


    posted @ 2019-11-26 15:13 paulwong 閱讀(923) | 評論 (0)編輯 收藏

    Git版本控制與工作流



    https://www.jianshu.com/p/67afe711c731

    posted @ 2019-11-26 11:21 paulwong 閱讀(341) | 評論 (0)編輯 收藏

    GIT TAG

    GIT中的tag 相當于是一個快照,是不能更改它的代碼的。
    如果要在 tag 代碼的基礎上做修改,你需要一個分支: 

    通常TAG與軟件版本相對應,即TAG名稱用軟件版本號來表示。

    軟件版本的格式規范:
    版本格式:主版本號.次版本號.修訂號,版本號遞增規則如下:

    主版本號:當你做了不兼容的 API 修改,
    次版本號:當你做了向下兼容的功能性新增,
    修訂號:當你做了向下兼容的問題修正。

    先行版本號及版本編譯信息可以加到“主版本號.次版本號.修訂號”的后面,作為延伸。

    Git打標簽與版本控制規范
    https://juejin.im/post/5b0531c6f265da0b7f44eb8c

    git切換到某個tag
    https://blog.csdn.net/DinnerHowe/article/details/79082769

    git cherry-pick 把提交到A分支的部分commit 再提交到B分支上
    http://yijiebuyi.com/blog/0e65f4a59a1cfa05c5b30ccb6c2f413d.html

    posted @ 2019-11-26 10:57 paulwong 閱讀(324) | 評論 (0)編輯 收藏

    MAVEN打多環境包

    通常配置文件是放在src/main/resources下,build完之后會放在classes文件夾下,最終會打進jar包中。

    如果是SPRING BOOT工程,部署時,要求配置文件不打進jar包中,要有sh啟動命令文件,最終產生一個ZIP包,包含所有需要的東西。這時就需要善用MAVEN的resource插件、assembly插件和jar插件了。

    resource插件能重定義配置文件在output時的文件夾路徑,用profile的變量值替換配置文件中的占位符。
    但要更改點位符的默認定義:
    <properties>
            <resource.delimiter>${}</resource.delimiter>
        </properties>


    jar插件能排除生成在classes文件夾中不要的文件被打進jar包中。

    assembly插件能定義ZIP包中需要包含哪些文件。

    <resources>  
            <resource>  
                <directory>src/main/bin</directory>
                <!--表明此文件夾中如有占位符,則會取pom中的profile中的值代替-->
                <filtering>true</filtering>
                <includes>  
                    <include>*.sh</include>
                </includes>
            </resource>  
    </resources>  

    <plugin>  
            <artifactId>maven-jar-plugin</artifactId>  
            <configuration>
                <!--bin/文件夾不會被打進jar包-->
                <excludes>  
                    <exclude>bin/</exclude>
                </excludes>
            </configuration>  
    </plugin>  

    <fileSet>  
            <!--定義bin/文件夾被打進zip包-->
            <directory>${build.outputDirectory}/bin</directory>  
            <outputDirectory>bin</outputDirectory>
            <fileMode>0755</fileMode>  
    </fileSet>  


    maven打包加時間戳
    https://blog.csdn.net/z410970953/article/details/50680603

    posted @ 2019-11-21 16:40 paulwong 閱讀(665) | 評論 (0)編輯 收藏

    Maven打包時,環境變量替換,并解決spring-boot項目中${}無效的問題

    https://www.jianshu.com/p/cf3bd9ddfe6f

    posted @ 2019-11-20 16:12 paulwong 閱讀(744) | 評論 (0)編輯 收藏

    LOGBACK FOR SPRING

    當程序中使用LOGGER.INFO("MESSAGE");要求打印日志時,LOGBACK會獲取該行代碼所在類的全名,和打印等級(INFO/DEBUG等),再在配置文件的<logger>中查找對應logger,使用其配置的appender組件打印日志,如無法找到對應的logger,則使用<root>對應的appender打印日志。

    其中appender是用來輸出日志,有file和console兩個實現,console則是向控制臺輸出日志,而file則是向文件輸出日志。
    rolling file appender中,有rollingPolicy和triggerPolicy兩個主要屬性,rollingPolicy是確定如何處理日志文件,而triggerPolicy則是確定何時處理日志文件。

    如果要使用SPRING針對LOGBACK的一些功能,如profile等,則要將logback.xml的配置文件命名為logback-spring.xml,并在SPRING中配置,logging.config= logback-spring.xml。

    SPRING會將logging.file、logging.path這些配置轉成系統變量LOG_FILE、LOG_PATH,可在配置文件中直接引用,如${LOG_FILE}。

    如果logback配置文件要SPRING的其他屬性,則要使用如下標簽:
    <springProperty scope="context" name="logLevel" source="log.level"/>

    如果要使用LOGBACK的一些常用屬性,可引入:
    <include resource="org/springframework/boot/logging/logback/defaults.xml"/>
    <include resource="org/springframework/boot/logging/logback/console-appender.xml"/>
    如CONSOLE APPENDER,此resource在spring-boot-version.jar中。


    =========================================
    看完這個不會配置 logback ,請你吃瓜!
    https://juejin.im/post/5b51f85c5188251af91a7525

    logback解析——Appender
    https://juejin.im/post/5a39c91cf265da4327185d10

    SpringBoot中logback.xml使用application.yml中屬性
    https://www.cnblogs.com/jianliang-Wu/p/8945343.html

    springboot使用logback-spring.xml配置講解
    https://blog.csdn.net/heguiliang_123/article/details/80296745

    Logback配置
    https://www.cnblogs.com/cjsblog/p/9113131.html

    Logback中如何自定義靈活的日志過濾規則
    https://www.jianshu.com/p/d6360c517264

    Spring Boot中的日志
    http://loveshisong.cn/%E7%BC%96%E7%A8%8B%E6%8A%80%E6%9C%AF/2016-11-03-Spring-Boot%E4%B8%AD%E7%9A%84%E6%97%A5%E5%BF%97.html

    Spring Boot與logback總結
    https://blog.csdn.net/u014527058/article/details/79667458

    SpringBoot Logback 配置參數遷移到配置中心 Apollo
    https://blog.csdn.net/shuaizai88/article/details/83027262

    posted @ 2019-11-19 15:14 paulwong 閱讀(360) | 評論 (0)編輯 收藏

    MONGODB安裝


    https://www.jianshu.com/p/d3b31b7aa182 

    后續初始化用戶及數據庫
    http://www.qianduan8.com/1786.html
    https://zocada.com/setting-mongodb-users-beginners-guide/

    如果要以認證的方式登錄,需加以下內容至/etc/mongod.conf
    security:
      authorization: enabled

    如果用GUI連接數據庫時,不顯示數據庫列表,要加權限:listDatabases
    https://stackoverflow.com/questions/19458524/mongodb-show-dbs-and-show-log-without-clusteradmin-role

    posted @ 2019-11-15 17:30 paulwong 閱讀(341) | 評論 (0)編輯 收藏

    Setting up ActiveMQ for HA-Load Balance


    In a typical enterprise applications, we often need messaging and asynchronous processing.
    To satisfy this need, we need a reliable as well as scalable messaging infrastructure. In currently available messaging infrastructures Apache ActiveMQ stands out in terms of features and simplicity.

    Apache ActiveMQ comes with lot of features in built and also provides a way to configure or tweak as per the needs of an application.

    In this post , we will explore how to enable network of activeMQ brokers so that we achieve HA(High Availability) as well as load balance between consumers & producers.

    I carried out  my experiment on local machine with ACtiveMQ 5.8.0, but this can be easily upgraded to latest versions of ActiveMQ viz. 5.10.0

    To have network of brokers, we need multiple brokers. So, I changed tcp and admin ports of brokers so that I can run multiple brokers on single machine.

    To get brief background on network of broker, please visit this link

    In this post we will setup below topology, we will mix failover and NOB to get work done,

    1. Producer1 is configured to send messages to broker3 with failover to broker2
    2. Producer2 is configured to send messages to broker2 with failover to broker3
    3. Broker3, Broker2 are networked with Broker1as below


    4. Broker1 is connected with broker4 with NOB.
    5. Make sure you enable "advisorySupport" on the broker, which is essential for transparent routing of messages across brokers.
    Dry Run:
    1. Producer1 sends messages to queue "input.q" on broker3, where there are no active consumers, but it see subscriptions from broker1
    2. Broker1 and broker 4 are has consumers which are looking at "input.q".
    3. When broker3 receives a message it forwards it to broker1, as its in networked and has active consumers for "input.q" 
    4. When broker1 receives a messages on "input.q", it gets load balanced between broker1 and broker4  as both has consumers looking for "input.q".
    5. Whenever broker3 goes down, producer1 switches transparently to broker2, as its configured with failover.
    6. I used prefetch size as 1, so that you can load balancing on consumers
    Sample activemq configurations can be downloaded from here.

    posted @ 2019-11-04 16:14 paulwong 閱讀(393) | 評論 (0)編輯 收藏

    ACTIVE MQ HA

    組建ACTIVEMQ CLUSTER,使得其中一個ACTIVE MQ DOWN掉時,能自動切換到其他節點。

    ACTIVEMQ 只有MASTER-SLAVE模式,集群中的多個節點共享消息的存儲,多個節點同時啟動時,競爭消息存儲的鎖,誰先取得,誰就是MASTER,當MASTER DOWN掉時,鎖被釋放,SALVE中馬上又競爭鎖,取得者成為MASTER。

    方案:
    • 安裝NFSV4
    • 修改消息存儲路徑
      <persistenceAdapter>
        <kahaDB directory="/sharedFileSystem/sharedBrokerData"/>
      </persistenceAdapter>
    • 客戶端修改連接字符串
      failover://(tcp://master:61616,tcp://slave:61616)?randomize=false
    --》


    https://my.oschina.net/hzchenyh/blog/716424

    https://www.iteye.com/blog/shift-alt-ctrl-2069250

    https://stackoverflow.com/questions/53542928/activemq-ha-on-failover

    https://activemq.apache.org/shared-file-system-master-slave

    ActiveMQ(6)-基于networkConnector的Broker-Cluster方案
    https://blog.csdn.net/jinjin603/article/details/78657387


    Multi Data Centre Message Brokers with ActiveMQ
    https://medium.com/thg-tech-blog/multi-data-centre-message-brokers-with-activemq-28495046370e

    ActiveMQ中的NetworkConnector(網絡連接器)詳解
    https://www.iteye.com/blog/manzhizhen-2116920

    a

    posted @ 2019-11-01 10:46 paulwong 閱讀(396) | 評論 (0)編輯 收藏

    ACTIVEMQ設置預取消息數目

    當ACTIVEMQ的某個QUEUE有多個消費者,為避免某個消息者取了更多個消息處理,而造成其他消費者無消息可處理的情況,可以設置每個消費者不預取消息,即每個消費者消費完單個消息后,再去取消息,這樣其他消費者就能平均的有消息可處理。


    https://stackoverflow.com/questions/35928089/activemq-how-to-prevent-message-from-going-to-dispatched-queue


    設置方法,在CONNECT STRING中設置:
    tcp://localhost:61616?jms.prefetchPolicy.all=0 

    tcp://localhost:61616?jms.prefetchPolicy.queuePrefetch=0 

    queue = new ActiveMQQueue("TEST.QUEUE?consumer.prefetchSize=10"); 
    consumer = session.createConsumer(queue);

    http://activemq.apache.org/what-is-the-prefetch-limit-for.html

    posted @ 2019-10-31 11:28 paulwong 閱讀(833) | 評論 (0)編輯 收藏

    僅列出標題
    共115頁: First 上一頁 21 22 23 24 25 26 27 28 29 下一頁 Last 
    主站蜘蛛池模板: 一级毛片大全免费播放| 亚洲精品NV久久久久久久久久| 国产成人高清精品免费观看| 亚洲jjzzjjzz在线观看| 国产偷v国产偷v亚洲高清| 国产一级淫片视频免费看| 国产乱子精品免费视观看片| a级毛片高清免费视频就| 一区二区三区在线观看免费| 亚洲色欲啪啪久久WWW综合网| 亚洲韩国—中文字幕| 亚洲欧洲日产国码av系列天堂| yy6080久久亚洲精品| 在线a人片天堂免费观看高清| 1000部拍拍拍18免费网站| 日本黄色动图免费在线观看| 国产成人精品免费大全| 四虎一区二区成人免费影院网址| 亚洲中文无码mv| 麻豆狠色伊人亚洲综合网站| 亚洲精品**中文毛片| 日韩精品亚洲人成在线观看| 久久亚洲国产中v天仙www| 亚洲香蕉成人AV网站在线观看| 免费在线视频一区| 免费a级毛片18以上观看精品| 成人一a毛片免费视频| 免费国产成人高清在线观看网站| 91热成人精品国产免费| 久久久久久精品免费免费自慰| 久久免费视频精品| 久久精品成人免费观看| 日本一道本不卡免费| 免费人成毛片动漫在线播放| 免费在线观看一级片| 暖暖免费在线中文日本| 亚洲免费精彩视频在线观看| 99热这里只有精品6免费| 国内精品免费麻豆网站91麻豆| 美女被免费喷白浆视频| a级毛片无码免费真人|