??xml version="1.0" encoding="utf-8" standalone="yes"?>ɱ:BlogJava - 4399ɱol|ɱ佫//www.lmlez.icu/paulwong/zh-cnWed, 16 Oct 2019 03:26:42 GMTWed, 16 Oct 2019 03:26:42 GMT60Spring Integration 中文手册 - GOOD - 4399ɱol|ɱ佫//www.lmlez.icu/paulwong/archive/2019/10/11/434799.htmlpaulwongpaulwongFri, 11 Oct 2019 02:28:00 GMT//www.lmlez.icu/paulwong/archive/2019/10/11/434799.html//www.lmlez.icu/paulwong/comments/434799.html//www.lmlez.icu/paulwong/archive/2019/10/11/434799.html#Feedback0//www.lmlez.icu/paulwong/comments/commentRss/434799.html//www.lmlez.icu/paulwong/services/trackbacks/434799.htmlSpring Integration 中文手册 (1)


Spring Integration 中文手册 (2)

paulwong 2019-10-11 10:28 发表评论
]]>
LINUX配置DNS - 4399ɱol|ɱ佫//www.lmlez.icu/paulwong/archive/2019/10/10/434793.htmlpaulwongpaulwongThu, 10 Oct 2019 02:55:00 GMT//www.lmlez.icu/paulwong/archive/2019/10/10/434793.html//www.lmlez.icu/paulwong/comments/434793.html//www.lmlez.icu/paulwong/archive/2019/10/10/434793.html#Feedback0//www.lmlez.icu/paulwong/comments/commentRss/434793.html//www.lmlez.icu/paulwong/services/trackbacks/434793.htmlvi /etc/resolv.conf

nameserver 8.8.8.8

paulwong 2019-10-10 10:55 发表评论
]]>
在SPRING INTEGRATION中手动开始和停止JMS LISTENER - 4399ɱol|ɱ佫//www.lmlez.icu/paulwong/archive/2019/10/09/434781.htmlpaulwongpaulwongWed, 09 Oct 2019 09:16:00 GMT//www.lmlez.icu/paulwong/archive/2019/10/09/434781.html//www.lmlez.icu/paulwong/comments/434781.html//www.lmlez.icu/paulwong/archive/2019/10/09/434781.html#Feedback0//www.lmlez.icu/paulwong/comments/commentRss/434781.html//www.lmlez.icu/paulwong/services/trackbacks/434781.html
SPRING INTEGRATION是实CEIP模式的一U框Ӟ即用CHANNEL和JMS-INBOUND-ADAPTER、JMS-OUTBOUND-ADAPTERQ完全脱MJmsTemplate的API?br />
如果需要实现这U场景:从BROKER取一条消息,处理消息Q且处理途中不要再从BROKER再取消息Q处理完后再取消息,再处理?br />
q样要求手动开始和停止JMS LISTENERQ即手动开始和停止JMS-INBOUND-ADAPTER、JMS-OUTBOUND-ADAPTER?br />
@Bean
@InboundChannelAdapter(value = "loaderResponseChannel")
public MessageSource loaderResponseSource() throws Exception {
    return Jms
            .inboundAdapter(oracleConnectionFactory())
            .configureJmsTemplate(
                    t -> t.deliveryPersistent(true)
                            .jmsMessageConverter(jacksonJmsMessageConverter())
            ).destination(jmsInbound).get();
}

当用@InboundChannelAdapterӞ会自动注册一个SourcePollingChannelAdapter Q但q个名字比较长:configrationName.loaderResponseSource.inboundChannelAdapter?br />
呼叫q个实例的start()和stop()Ҏ卛_?br />
@Bean
public IntegrationFlow controlBusFlow() {
    return IntegrationFlows.from("controlBus")
              .controlBus()
              .get();
}

Message operation = MessageBuilder.withPayload("@configrationName.loaderResponseSource.inboundChannelAdapter.start()").build();
operationChannel.send(operation)

https://stackoverflow.com/questions/45632469/shutdown-spring-integration-with-jms-inboundadapter

https://docs.spring.io/spring-integration/docs/5.0.7.RELEASE/reference/html/system-management-chapter.html#control-bus

https://github.com/spring-projects/spring-integration-java-dsl/blob/master/src/test/java/org/springframework/integration/dsl/test/jms/JmsTests.java

https://stackoverflow.com/questions/50428552/how-to-stop-or-suspend-polling-after-batch-job-fail


paulwong 2019-10-09 17:16 发表评论
]]>
CountDownLatch、CyclicBarrier和Semaphore - 4399ɱol|ɱ佫//www.lmlez.icu/paulwong/archive/2019/09/24/434696.htmlpaulwongpaulwongTue, 24 Sep 2019 02:18:00 GMT//www.lmlez.icu/paulwong/archive/2019/09/24/434696.html//www.lmlez.icu/paulwong/comments/434696.html//www.lmlez.icu/paulwong/archive/2019/09/24/434696.html#Feedback0//www.lmlez.icu/paulwong/comments/commentRss/434696.html//www.lmlez.icu/paulwong/services/trackbacks/434696.htmlCountDownLatch、CyclicBarrier和Semaphoreq三个ƈ发辅助类Q可以在U程中呼叫,使得U程暂停{,但各有不同?br />
  • CountDownLatch
1、初始化Qƈ传入计数?br /> 2、向不同的线E传入CountDownLatch实例
3、如果在某一U程中呼叫await()Q则此线E被挂vQ直到计数器?Q才往下执?br /> 4、如果在某一U程中呼叫countDown()Q计数器?
5、最l如果计数器gؓ0Ӟ则CountDownLatch实例不再起作用了Q即Zơ性的

  • CyclicBarrier
1、初始化Qƈ传入计数器|也可传入一个Runnablec,会在计数器ؓ0Ӟ被执?br /> 2、向不同的线E传入CyclicBarrier实例
3、如果在某一U程中呼叫await()Q则此线E被挂vQ直到计数器?Q才往下执?br /> 4、其他线E呼叫await()Q则此线E被挂vQ直到计数器?Q才往下执?br /> 5、最l如果计数器gؓ0Ӟ则CyclicBarrier实例会将计数器值恢复,又可重用

  • Semaphore
1、初始化Qƈ传入计数器?br /> 2、向不同的线E传入Semaphore实例
3、如果在某一U程中呼叫acquire()Q则Semaphore实例会将计数器值减1Q如果计数器gؓ-1Q则计数器值置?Q此U程被挂P直到计数器值大?Ӟ才往下执?br /> 4、此U程需呼叫release()Q得计数器?1Q以便其他线E在计数器gؓ0时不受阻


CountDownLatch 例子Q?br />
public class Test {
     public static void main(String[] args) {   
         final CountDownLatch latch = new CountDownLatch(2);
          
         new Thread(){
             public void run() {
                 try {
                     System.out.println("子线E?+Thread.currentThread().getName()+"正在执行");
                    Thread.sleep(3000);
                    System.out.println("子线E?+Thread.currentThread().getName()+"执行完毕");
                    latch.countDown();
                } catch (InterruptedException e) {
                    e.printStackTrace();
                }
             };
         }.start();
          
         new Thread(){
             public void run() {
                 try {
                     System.out.println("子线E?+Thread.currentThread().getName()+"正在执行");
                     Thread.sleep(3000);
                     System.out.println("子线E?+Thread.currentThread().getName()+"执行完毕");
                     latch.countDown();
                } catch (InterruptedException e) {
                    e.printStackTrace();
                }
             };
         }.start();
          
         try {
             System.out.println("{待2个子U程执行完毕");
            latch.await();
            System.out.println("2个子U程已经执行完毕");
            System.out.println("l箋执行ȝE?);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
     }
}

l果Q?br />
U程Thread-0正在执行
U程Thread-1正在执行
{待2个子U程执行完毕
U程Thread-0执行完毕
U程Thread-1执行完毕
2个子U程已经执行完毕
l箋执行ȝE?/div>

CyclicBarrier例子Q?br />
public class Test {
    public static void main(String[] args) {
        int N = 4;
        CyclicBarrier barrier  = new CyclicBarrier(N,new Runnable() {
            @Override
            public void run() {
                System.out.println("当前U程"+Thread.currentThread().getName());   
            }
        });
         
        for(int i=0;i<N;i++)
            new Writer(barrier).start();
    }
    static class Writer extends Thread{
        private CyclicBarrier cyclicBarrier;
        public Writer(CyclicBarrier cyclicBarrier) {
            this.cyclicBarrier = cyclicBarrier;
        }
 
        @Override
        public void run() {
            System.out.println("U程"+Thread.currentThread().getName()+"正在写入数据");
            try {
                Thread.sleep(5000);      //以睡眠来模拟写入数据操作
                System.out.println("U程"+Thread.currentThread().getName()+"写入数据完毕Q等待其他线E写入完?);
                cyclicBarrier.await();
            } catch (InterruptedException e) {
                e.printStackTrace();
            }catch(BrokenBarrierException e){
                e.printStackTrace();
            }
            System.out.println("所有线E写入完毕,l箋处理其他d");
        }
    }
}

执行l果Q?br />
U程Thread-0正在写入数据
U程Thread-1正在写入数据
U程Thread-2正在写入数据
U程Thread-3正在写入数据
U程Thread-0写入数据完毕Q等待其他线E写入完?br /> U程Thread-1写入数据完毕Q等待其他线E写入完?br /> U程Thread-2写入数据完毕Q等待其他线E写入完?br /> U程Thread-3写入数据完毕Q等待其他线E写入完?br /> 当前U程Thread-3
所有线E写入完毕,l箋处理其他d
所有线E写入完毕,l箋处理其他d
所有线E写入完毕,l箋处理其他d
所有线E写入完毕,l箋处理其他d


Semaphore例子Q?br />
public class Test {
    public static void main(String[] args) {
        int N = 8;            //工h?/span>
        Semaphore semaphore = new Semaphore(5); //机器数目
        for(int i=0;i<N;i++)
            new Worker(i,semaphore).start();
    }
     
    static class Worker extends Thread{
        private int num;
        private Semaphore semaphore;
        public Worker(int num,Semaphore semaphore){
            this.num = num;
            this.semaphore = semaphore;
        }
         
        @Override
        public void run() {
            try {
                semaphore.acquire();
                System.out.println("工h"+this.num+"占用一个机器在生");
                Thread.sleep(2000);
                System.out.println("工h"+this.num+"释放出机?);
                semaphore.release();           
            } catch (InterruptedException e) {
                e.printStackTrace();
            }
        }
    }
}

执行l果Q?br />
工h0占用一个机器在生
工h1占用一个机器在生
工h2占用一个机器在生
工h4占用一个机器在生
工h5占用一个机器在生
工h0释放出机?br /> 工h2释放出机?br /> 工h3占用一个机器在生
工h7占用一个机器在生
工h4释放出机?br /> 工h5释放出机?br /> 工h1释放出机?br /> 工h6占用一个机器在生
工h3释放出机?br /> 工h7释放出机?br /> 工h6释放出机?/div>
https://www.cnblogs.com/dolphin0520/p/3920397.html

https://juejin.im/post/5aeec3ebf265da0ba76fa327

paulwong 2019-09-24 10:18 发表评论
]]>使用 Jenkins 部v Spring Boot - 4399ɱol|ɱ佫//www.lmlez.icu/paulwong/archive/2019/09/19/434675.htmlpaulwongpaulwongThu, 19 Sep 2019 09:44:00 GMT//www.lmlez.icu/paulwong/archive/2019/09/19/434675.html//www.lmlez.icu/paulwong/comments/434675.html//www.lmlez.icu/paulwong/archive/2019/09/19/434675.html#Feedback0//www.lmlez.icu/paulwong/comments/commentRss/434675.html//www.lmlez.icu/paulwong/services/trackbacks/434675.htmlhttps://mp.weixin.qq.com/s?__biz=MzI4NDY5Mjc1Mg==&mid=2247489278&idx=2&sn=a48342d706bfd1651e277e1c24e81e3e&chksm=ebf6ce81dc81479764d1e6ff7b207257a78d52bed5ef8c2f16c76f70660d1da9609167ed7bbb&mpshare=1&scene=1&srcid=&sharer_sharetime=1568861026830&sharer_shareid=24856bf403968a883e437b859be0a9b5&pass_ticket=qB9yWQbj%2FGo7PDZNogjBwishDCx5Suu%2BvBWnS1TpKmY%3D#rd

paulwong 2019-09-19 17:44 发表评论
]]>
CI/CD 资源 - 4399ɱol|ɱ佫//www.lmlez.icu/paulwong/archive/2019/09/18/434669.htmlpaulwongpaulwongWed, 18 Sep 2019 09:08:00 GMT//www.lmlez.icu/paulwong/archive/2019/09/18/434669.html//www.lmlez.icu/paulwong/comments/434669.html//www.lmlez.icu/paulwong/archive/2019/09/18/434669.html#Feedback0//www.lmlez.icu/paulwong/comments/commentRss/434669.html//www.lmlez.icu/paulwong/services/trackbacks/434669.html //www.jamesbowman.me/post/continuous-delivery-tool-landscape/


paulwong 2019-09-18 17:08 发表评论
]]>
ANSIBLE + SPRING BOOT - 4399ɱol|ɱ佫//www.lmlez.icu/paulwong/archive/2019/09/18/434667.htmlpaulwongpaulwongWed, 18 Sep 2019 08:09:00 GMT//www.lmlez.icu/paulwong/archive/2019/09/18/434667.html//www.lmlez.icu/paulwong/comments/434667.html//www.lmlez.icu/paulwong/archive/2019/09/18/434667.html#Feedback0//www.lmlez.icu/paulwong/comments/commentRss/434667.html//www.lmlez.icu/paulwong/services/trackbacks/434667.htmlhttps://github.com/remyma/ansible-springboot

frontend+backend+jenkins+ansible
https://itnext.io/ci-cd-with-jenkins-and-ansible-f41ef2b33977

paulwong 2019-09-18 16:09 发表评论
]]>
Windowsl端工具_MobaXterm - 4399ɱol|ɱ佫//www.lmlez.icu/paulwong/archive/2019/09/11/434612.htmlpaulwongpaulwongWed, 11 Sep 2019 05:19:00 GMT//www.lmlez.icu/paulwong/archive/2019/09/11/434612.html//www.lmlez.icu/paulwong/comments/434612.html//www.lmlez.icu/paulwong/archive/2019/09/11/434612.html#Feedback0//www.lmlez.icu/paulwong/comments/commentRss/434612.html//www.lmlez.icu/paulwong/services/trackbacks/434612.htmlɱ:前言

  有h喜欢而美的工P有h喜欢大集成工兗这里推荐一Ƒ֢强型的Windowsl端工具MobaXtermQ它提供所有重要的q程|络工具QSSHQX11QRDPQVNCQFTPQMOSH ......Q和Unix命oQbashQlsQcatQsedQgrepQawkQrsync{)。用MobaXterm工具Q可以替代SSH客户端工?xshell、putty、securecrt{?、sftp/ftp工具Qwinscp、filezillaQ、远E桌面访问工PRDO{){等Q可以极大降低你windowspȝ上的软g安装数量?/span>

MobaXterm使用体会&优点

  1、工兯取简单、免安装Q绿色版Q、免费(不用到处找licenseQ、可个性化配置Q字体、前景色、背景色、语法高亮等Q?/span>

  2、可以替代xshell、putty、securecrt{SSH客户端、winscp、filezilla{ftp传输工具、替代RDOq程桌面讉K工具{。减windowspȝ软g安装和资源占用。我的系l已l超负荷q{

  3、可以替代CMDH口。CMD命o行字体太丑。。ƈ且配|还ȝ。实在不想用?/span>

  4、支持Unix/Linux常用命o使用。满_windows上学习操作linux命o的需求以及利用linux命o快速处理文本文件?/span>

  5、可以支持丰富的lgQ减部分Y件的安装。如Cygwin?/span>

  工具使用Q每个h对工具用的要求和场景不相同。需要了解MobaXtermҎ可以进?a target="_blank" style="color: #0000ff; text-decoration-line: none;">MobaXterm官网或者阅读MobaXterm帮助手册Q启动工?-> 菜单?help" -> "document"Q?/span>

MobaXterm主要功能

  1、远E会话管理器Q单个应用程序中的SSHQSFTPQtelnetQVNCQMoshQRDPq接

  2、Windows上的许多Unix/Linux命oQ基本Cygwin命oQbashQgrepQawkQsedQrsyncQ?..Q?/span>

  3、丰富的lg和插Ӟ可以自由选择。详情查?a target="_blank" style="color: #0000ff; text-decoration-line: none;">MobaXterm Plugins

  4、远E桌面:使用RDPQVNC或XDMCP在计机上显C完整的q程桌面

  5、嵌入式XserverQ在Windows计算Z昄q程应用E序

  6?...

MobaXterm工具下蝲

  MobaXterm工具分ؓ便携版(l色免安装版Q免费)和专业版Q收费)。对于大部分开发测试h员,免费的绿色免安装版本可以满x常工作的需求。下载\径:MobaXterm

MobaXterm使用技?/span>

1、执行cmd命o快速切换执行DOS指o。可以执行exit退回原界面?/span>

2、MobaXterm界面风格、主体、字体以及相兛_h式设|。MobaXterm --> Settings --> Configuration

3、MobaXterm取消自动断开SSH会话?/span>



paulwong 2019-09-11 13:19 发表评论
]]>
nohup命o不输出OUTPUT到实体文?/title><link>//www.lmlez.icu/paulwong/archive/2019/09/06/434590.html</link><dc:creator>paulwong</dc:creator><author>paulwong</author><pubDate>Fri, 06 Sep 2019 02:15:00 GMT</pubDate><guid>//www.lmlez.icu/paulwong/archive/2019/09/06/434590.html</guid><wfw:comment>//www.lmlez.icu/paulwong/comments/434590.html</wfw:comment><comments>//www.lmlez.icu/paulwong/archive/2019/09/06/434590.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>//www.lmlez.icu/paulwong/comments/commentRss/434590.html</wfw:commentRss><trackback:ping>//www.lmlez.icu/paulwong/services/trackbacks/434590.html</trackback:ping><description><![CDATA[<a target="_blank">https://stackoverflow.com/questions/10408816/how-do-i-use-the-nohup-command-without-getting-nohup-out</a><img src ="//www.lmlez.icu/paulwong/aggbug/434590.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="//www.lmlez.icu/paulwong/" target="_blank">paulwong</a> 2019-09-06 10:15 <a href="//www.lmlez.icu/paulwong/archive/2019/09/06/434590.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>MONGODB拓展操作 - 4399ɱol|ɱ佫//www.lmlez.icu/paulwong/archive/2019/09/03/434556.htmlpaulwongpaulwongTue, 03 Sep 2019 07:52:00 GMT//www.lmlez.icu/paulwong/archive/2019/09/03/434556.html//www.lmlez.icu/paulwong/comments/434556.html//www.lmlez.icu/paulwong/archive/2019/09/03/434556.html#Feedback0//www.lmlez.icu/paulwong/comments/commentRss/434556.html//www.lmlez.icu/paulwong/services/trackbacks/434556.htmlhttps://blog.csdn.net/ClementAD/article/details/55210973

Spring Data MongoDBpd之三Q数据库扚w操作
https://blog.csdn.net/sinat_24044957/article/details/80646292

Distinct in Spring Data MongoDB
https://stackoverflow.com/questions/19203724/distinct-in-spring-data-mongodb

MONGODB SQL语句
//www.runoob.com/mongodb/mongodb-indexing.html




4399ɱol 2019-09-03 15:52 发表评论
]]>