- 博客(7)
- 收藏
- 关注
原创 SpringBoot integrates the Karate Test framework and run.
目录 1. Add maven dependency 2. Write feature file 3. Write Runner file 4. Run a. Run feature file in idea b. Use runner 1. Add maven dependency <!--karate test --> <dependency> <groupId>com.intuit.karate</groupId> <...
2021-02-25 17:35:21
412
原创 Record modification of Swagger request body causing problems.
This article will record the resolution process of the following problems. When Swagger request body is JSONObject, how to display detailed parameters in the API document? What the difference between Swagger2 and Swagger3 about the JWT authenticate? How
2021-02-04 13:29:39
162
原创 Spring小记
用了@Async的类药自动注入必须要CGLIB动态代理 实现了接口的类会默认用JDK动态代理 可以用proxyTargetClass=true强制用CGLIB代理
2019-03-27 13:16:00
181
原创 各集合类区别与实现原理
HashMap和Hashtable的区别 1.两者最主要的区别在于Hashtable是线程安全,而HashMap则非线程安全 2.HashMap可以使用null作为key,而Hashtable则不允许null作为key(HashMap以null作为key时,总是存储在table数组的第一个节点上) 3.HashMap的初始容量为16,Hashtable初始容量为11,两者的填充因子默认都是0.75...
2018-05-18 14:45:10
371
原创 volatile的特点与应用
可见性如果对声明了volatile变量进行写操作时,JVM会向处理器发送一条Lock前缀的指令,将这个变量所在缓存行的数据写会到系统内存有序性Lock前缀指令实际上相当于一个内存屏障(也成内存栅栏),它确保指令重排序时不会把其后面的指令排到内存屏障之前的位置,也不会把前面的指令排到内存屏障的后面;即在执行到内存屏障这句指令时,在它前面的操作已经全部完成。不保证原子性单例模式中的double che...
2018-05-17 14:25:41
212
原创 Spring如何将前台Json转换成Java对象
Spring内置HttpMessageConverter 转换器,其运行原理:(1)HttpInputMessage 将请求的信息先转为 InputStream 对象,InputStream 再由 HttpMessageConverter 转换为 SpringMVC 需要的java对象;(2)SpringMVC 返回一个 java 对象, 并通过 HttpMessageConverter 转为响应...
2018-05-09 18:57:46
3837
1
原创 Spring是怎样检测并处理我们@RequestMapping注解的:
BeanFactory在创建Bean过程中需要执行populateBean方法,populateBean方法便是@Autowired注解的处理过程,执行的属性的自动注入等操作。其中InitiaizingBean接口,它的实现Bean会在容器完成属性注入后执行一个自定义操作 <mvc:annotation-driven/>当在配置文件中加上该标记后,Spring(3.1后)会默认为我们...
2018-05-07 19:28:25
2390
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人