Learning
creepcheck
这个作者很懒,什么都没留下…
展开
-
Spring: Connect 2 Backends, Jersey, Jackson, @ResponseBody, @Produces, Json (de)serialize
1. @ResponseBody, @Produces不太清楚Spring中,两个backend互相call,返回的值会被如何打包并通过何种协议(应该是http)进行传输。先总结一下: 1. @Produces, @Consumes可以和@ResponseBody一起使用,我的理解是在打包成http的response和request的时候,还能指定media type。2. @Produces和@Consumes并不负责serialize或者deserialize POJO -> JSON /原创 2020-07-19 15:01:44 · 258 阅读 · 0 评论 -
ThreadPool -逐渐更新
1. How to stop a Callable submitted to ExecutorService?Using the shutdown will bring down the entire executorService… This executor service might also be processing few more threads…You can cancel a future using Future.cancel() method. It attempts to can原创 2020-07-04 12:15:20 · 224 阅读 · 0 评论 -
0629-@Resource, JUnit-Response, objectMapper, Jest fetch/tooltip undefined, mimic ConsumerRecords...
1. How to stop a Callable submitted to ExecutorService?using the shutdown will bring down the entire executorService… This executor service might also be processing few more threads…https://stackoverflow.com/questions/36375204/how-to-terminate-callable-p原创 2020-07-04 11:18:00 · 272 阅读 · 0 评论 -
各种情境下获得Spring Application Context
1. How to get Spring application context最开始我想写一个public static void main, 去直接run一个bean的方法,所以我需要给它提供一个spring application context。总结有以下几种方法:1. 1 ClassPathXmlApplicationContext但其实我没有config.xml文件,所以不行@Componentpublic class Main { public static void main(S原创 2020-06-15 10:47:18 · 301 阅读 · 0 评论