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

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

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

    paulwong

    #

    Multiple MongoDB connectors with Spring Boot

    http://blog.marcosbarbero.com/multiple-mongodb-connectors-in-spring-boot/

    https://github.com/yinjihuan/spring-boot-starter-mongodb-pool

    https://github.com/lish1le/mongodb-plus

    posted @ 2019-06-20 15:12 paulwong 閱讀(340) | 評論 (0)編輯 收藏

    NFS Server 架設

    1. 安裝 nfs-utils 套件。
      [root@kvm5 ~]# yum install -y nfs-utils
    2. 建立 NFS 分享目錄。
      [root@kvm5 ~]# mkdir /public /protected
    3. 修改 NFS 分享目錄的 SELinux 檔案 context。
      [root@kvm5 ~]# semanage fcontext -a -t public_content_t "/public(/.*)?"
      [root@kvm5 ~]# semanage fcontext -a -t public_content_t "/protected(/.*)?"
      [root@kvm5 ~]# restorecon -Rv /public /protected
    4. 考試時不用自行產生 kerberos keytab,只要依照指定的位置下載,存放在目錄 /etc/ 下,且檔名必須為 krb5.keytab。
      [root@kvm5 ~]# wget http://deyu.wang/kvm5.keytab -O /etc/krb5.keytab 
    5. kerberos keytab 的驗證跟時間有關,server 與 client 都必須校時。
      [root@kvm5 ~]# date
      Sun Jan  7 14:50:04 CST 2018
      [root@kvm5 ~]# chronyc -a makestep
      200 OK
      200 OK
      [root@kvm5 ~]# date
      Mon Nov 20 15:53:22 CST 2017
    6. 在 /protected 下建立次目錄 restricted,並將其擁有者設定為 deyu3,讓 deyu3 可以寫入資料。
      [root@kvm5 ~]# mkdir -p  /protected/restricted 
      [root@kvm5 ~]# chown deyu3 /protected/restricted 
    7. 編輯設定檔 /etc/exports,分享 /protected 及 /public 兩個目錄給網域 192.168.122.0/24。
      [root@kvm5 ~]# echo '/protected 192.168.122.0/24(rw,sync,sec=krb5p)' > /etc/exports
      [root@kvm5 ~]# echo '/public 192.168.122.0/24(ro,sync)' >> /etc/exports
      [root@kvm5 ~]# vim /etc/exports
      [root@kvm5 ~]# cat /etc/exports
      /protected 192.168.122.0/24(rw,sync,sec=krb5p)
      /public 192.168.122.0/24(ro,sync)

    8. NFS 掛載參數說明如下,詳細說明請參考 man 5 nfs 手冊。
      1. rw:read-write,可讀寫的權限;
      2. ro:read-only,唯讀的權限;
      3. sec=mode:安全認證模式;
        1. sec=sys 預設,使用本地 UNIX UIDs 及 GIDs 進行身份認證。
        2. sec=krb5 使用 Kerberos V5 取代本地 UNIX UIDs 及 GIDs 進行身份認證。
        3. sec=krb5i 使用 Kerberos V5 進行身份認證,資料完整性檢查,以防止數據被篡改。
        4. sec=krb5p 使用 Kerberos V5 進行身份認證,資料完整性檢查及 NFS 傳輸加密,以防止數據被篡改,這是最安全的方式。
      4. sync:資料同步寫入到記憶體與硬碟當中;
      [root@kvm5 ~]# man 5 nfs 
    9. 設定使用 4.2 版本,以匯出分享 SELinux context。無適合的版本 client 端掛載時會出現 mount.nfs: Protocol not supported 的訊息。
      [root@kvm5 ~]# vim /etc/sysconfig/nfs  sed -i 's/^\(RPCNFSDARGS=\).*$/\1\"-V 4.2\"/' /etc/sysconfig/nfs 
      [root@kvm5 ~]# grep ^RPCNFSDARGS /etc/sysconfig/nfs  RPCNFSDARGS="-V 4.2" 
    10. 設定開機啟動 nfs 服務,NFS server 端的服務為 nfs-server 及 nfs-secure-server,本版本只要啟動 nfs-server 就同時啟動 nfs-secure-server,而且使用 tab 鍵也不會出現 nfs-secure-server 服務,但有些版本則是兩者分開,必須確認是不是兩種服務都啟動。
      [root@kvm5 ~]# systemctl enable nfs-server.service nfs-secure-server.service 
    11. 啟動 nfs 服務
      [root@kvm5 ~]# systemctl start nfs-server.service nfs-secure-server.service 
    12. 查看目前啟動的 nfs 版本,因 server 指定使用 4.2,若出現 -4.2 表示 nfs server 沒有成功啟動。
      [root@kvm5 ~]# cat /proc/fs/nfsd/versions -2 +3 +4 +4.1 +4.2 
    13. 要確定 nfs-secure-server nfs-server 服務都正常運作。
      [root@kvm5 ~]# systemctl status nfs-secure-server.service nfs-server.service 
      nfs-secure-server.service - Secure NFS Server
         Loaded
      : loaded (/usr/lib/systemd/system/nfs-secure-server.service; enabled)
         Active
      : active (running) since Mon 2015-09-21 20:04:10 CST; 8s ago
        Process
      : 3075 ExecStart=/usr/sbin/rpc.svcgssd $RPCSVCGSSDARGS (code=exited, status=0/SUCCESS)
       Main PID
      : 3077 (rpc.svcgssd)
         CGroup
      : /system.slice/nfs-secure-server.service
                 └─
      3077 /usr/sbin/rpc.svcgssd

      Sep 
      21 20:04:10 kvm5.deyu.wang systemd[1]: Starting Secure NFS Server
      Sep 
      21 20:04:10 kvm5.deyu.wang systemd[1]: Started Secure NFS Server.

      nfs
      -server.service - NFS Server
         Loaded
      : loaded (/usr/lib/systemd/system/nfs-server.service; enabled)
         Active
      : active (exited) since Mon 2015-09-21 20:04:10 CST; 8s ago
        Process
      : 3078 ExecStopPost=/usr/sbin/exportfs -f (code=exited, status=0/SUCCESS)
        Process
      : 3076 ExecStop=/usr/sbin/rpc.nfsd 0 (code=exited, status=0/SUCCESS)
        Process
      : 3087 ExecStart=/usr/sbin/rpc.nfsd $RPCNFSDARGS $RPCNFSDCOUNT (code=exited, status=0/SUCCESS)
        Process
      : 3084 ExecStartPre=/usr/sbin/exportfs -r (code=exited, status=0/SUCCESS)
        Process
      : 3083 ExecStartPre=/usr/libexec/nfs-utils/scripts/nfs-server.preconfig (code=exited, status=0/SUCCESS)
       Main PID
      : 3087 (code=exited, status=0/SUCCESS)
         CGroup
      : /system.slice/nfs-server.service

      Sep 
      21 20:04:10 kvm5.deyu.wang systemd[1]: Starting NFS Server
      Sep 
      21 20:04:10 kvm5.deyu.wang systemd[1]: Started NFS Server.
    14. 建議不論是否 TAB 有沒有出現提示,都同時啟動這兩個服務。CentOS 安裝版本 nfs-utils-1.3.0-8.el7.x86_64 啟動 nfs-secure-server 出現錯誤訊息,請執行 yum downgrade nfs-utils 換成 nfs-utils-1.3.0-0.el7.x86_64 套件。
      [root@kvm5 ~]# rpm -qa | grep nfs-utils
      nfs-utils-1.3.0-8.el7.x86_64
      [root
      @kvm5 ~]# yum downgrade nfs-utils -y
      [root@kvm5 ~]# rpm -qa | grep nfs-utils
      nfs-utils-1.3.0-0.el7.x86_64
    15. 再重新啟動 nfs 服務,並查看是否正常運作。
      [root@kvm5 ~]# systemctl restart nfs-server.service nfs-secure-server.service 
    16. 輸出所有設定的 nfs 分享目錄。
      [root@kvm5 ~]# exportfs -arv
      exporting 192.168.122.0/24:/public
      exporting 
      192.168.122.0/24:/protected

    posted @ 2019-06-18 09:08 paulwong 閱讀(396) | 評論 (0)編輯 收藏

    centos7 mysql數據庫安裝和配置


    https://www.cnblogs.com/starof/p/4680083.html 

    https://www.daniloaz.com/en/how-to-create-a-user-in-mysql-mariadb-and-grant-permissions-on-a-specific-database/

    https://huongdanjava.com/mysql-2

    http://www.runoob.com/mysql/mysql-install.html

    posted @ 2019-06-14 10:24 paulwong 閱讀(363) | 評論 (0)編輯 收藏

    SPRING BOOT 打包部署指南


    https://segmentfault.com/a/1190000017386408

    posted @ 2019-06-13 15:22 paulwong 閱讀(328) | 評論 (0)編輯 收藏

    Spring batch 的高級特性--監聽,異常處理,事務


    https://my.oschina.net/u/2600078/blog/909346

    posted @ 2019-06-12 17:03 paulwong 閱讀(695) | 評論 (0)編輯 收藏

    LINUX安裝NFS


    https://qizhanming.com/blog/2018/08/08/how-to-install-nfs-on-centos-7

    How to fix "mountd: refused mount request: unmatched host"
    https://www.golinuxhub.com/2016/09/how-to-fix-mountd-refused-mount-request.html

    nfs設置固定端口并添加防火墻規則
    https://www.centos.bz/2017/12/nfs%E8%AE%BE%E7%BD%AE%E5%9B%BA%E5%AE%9A%E7%AB%AF%E5%8F%A3%E5%B9%B6%E6%B7%BB%E5%8A%A0%E9%98%B2%E7%81%AB%E5%A2%99%E8%A7%84%E5%88%99/

    a
    NFS Server 架設

    https://dywang.csie.cyut.edu.tw/dywang/rhce7/node60.html

    posted @ 2019-06-12 15:24 paulwong 閱讀(402) | 評論 (0)編輯 收藏

    zip4j

    縮解壓ZIP之Zip4j
    https://rensanning.iteye.com/blog/1836727

    posted @ 2019-06-10 16:47 paulwong 閱讀(346) | 評論 (0)編輯 收藏

    Message Processing With Spring Integration

    Full demo
    https://dzone.com/articles/message-processing-spring

    posted @ 2019-06-05 11:08 paulwong 閱讀(344) | 評論 (0)編輯 收藏

    Spring integration 基本概念

    1.spring integration 's architecture

    主要提供兩個功能:

    在系統內提供實現輕量級、事件驅動交互行為的框架

    在系統間提供一種基于適配器的平臺,以支持靈活的系統間交互

    2.spring integration對于企業集成模式的支持

    2.1Message:一個信息的單元,通常有消息頭(header)和消息內容(payload)組成

    2.2Message channel:消息處理節點之間的連接,負責將Message從生產者傳輸到消費者。

        根據消費者的多少,可分為point to point和publish-subscribe兩種


        根據消息傳輸方式的不同,分為同步和異步兩種

    2.3Message Endpoint:消息處理節點,消息從節點進入通道,也是從節點離開通道

    幾個常見的Message EndPoint:

    CHANNEL ADAPTER,用于連接該適配器的特點是單向消息流的,要么是消息通過該適配器進入通道,要么是消息通過該適配器離開通道


    MESSAGING GATEWAY,處理的消息流和Channel Adapter不同,不是單向的,即有進入該節點的消息,也會從該節點發出消息。



    SERVICE ACTIVATOR,該節點調用服務來處理輸入的消息,并將服務返回的數據發送到輸出通道。在spring integration中,調用的方法被限定為本地方法調用。


    ROUTER,路由器,將輸入的消息路由到某個輸出通道中


    SPLITTER,將輸入的消息拆分成子消息


    AGGREGATOR,將輸入的多個消息合并為一個消息


    3.觀看書中例子hello-world思考

    測試gateway時,下面代碼向通道names內放入消息world?


    然后service-activator從names通道中獲得消息world,調用方法sayHello返回值到給gateway?

    解釋:gateway有一個service-interface的屬性,這個屬性指向一個interface。當我們用一個接口聲明一個gateway時,spring integration會自動幫我們生成該接口的代理類,這樣當我們往gateway發送消息時,spring integration會通過代理類把消息轉發到default-request-channel中去



    作者:馬國標
    鏈接:https://www.jianshu.com/p/bf1643539f99
    來源:簡書
    簡書著作權歸作者所有,任何形式的轉載都請聯系作者獲得授權并注明出處。

    posted @ 2019-06-05 10:36 paulwong 閱讀(893) | 評論 (0)編輯 收藏

    如何在SPRING INTEGRATION中使用事務

    File Polling using the Spring Integration DSL
    http://porterhead.blogspot.com/2016/07/file-polling-using-spring-integration.html

    https://github.com/iainporter/spring-file-poller



    Transaction Support in Spring Integration
    https://www.baeldung.com/spring-integration-transaction

    posted @ 2019-06-04 14:19 paulwong 閱讀(431) | 評論 (0)編輯 收藏

    僅列出標題
    共115頁: First 上一頁 26 27 28 29 30 31 32 33 34 下一頁 Last 
    主站蜘蛛池模板: 亚洲精品无码专区| 亚洲视频网站在线观看| 亚洲色大成网站www| 免费精品国产自产拍在线观看图片| 亚洲制服中文字幕第一区| 男女作爱在线播放免费网站| 亚洲成A人片在线观看WWW| a级毛片在线免费观看| 亚洲AV无码专区在线播放中文| 国产精品偷伦视频观看免费| 亚洲AV天天做在线观看| 777成影片免费观看| 久久狠狠爱亚洲综合影院| 免费观看的a级毛片的网站| 真人无码作爱免费视频| 亚洲AⅤ无码一区二区三区在线| 午夜亚洲国产精品福利| 亚洲午夜久久久久妓女影院| 免费无码又爽又刺激高潮视频| 亚洲国产av高清无码| 女人18一级毛片免费观看| 免费无码又爽又黄又刺激网站| 国产亚洲精品无码成人| 99在线视频免费| 亚洲国产精华液2020| 亚洲综合国产精品第一页| 久久免费观看国产99精品| ww亚洲ww在线观看国产| 免费一级毛片在线播放| 十八禁在线观看视频播放免费| 亚洲人成高清在线播放| gogo全球高清大胆亚洲| 大地资源中文在线观看免费版| 91亚洲精品自在在线观看| 免费在线观看毛片| 在线美女免费观看网站h| 亚洲国产成人AV网站| 亚洲AV无码精品色午夜果冻不卡| 男人的好看免费观看在线视频| kk4kk免费视频毛片| 亚洲乱码在线视频|