![](https://img-blog.csdnimg.cn/20201014180756922.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
基于spring 的某些通用库
菩提丶道人
这个作者很懒,什么都没留下…
展开
-
spring-aop 妙用-方法参数校验
业务场景:在实现业务的过程中,往往都需要写一些繁琐的判断参数是否为null的代码,接口spring-aop 加注解实现通用的处理方法,使代码更为简洁1.先写好注解类@Retention(RetentionPolicy.RUNTIME)@Target({ElementType.TYPE,ElementType.METHOD})@Documentedpublic @interface ...原创 2018-11-16 14:23:35 · 771 阅读 · 0 评论 -
jdk8新特性(Lambda表达式)结合spring 线程池,一行代码实现多线程
1.配置spring 线程池@Configuration@EnableAsync@ConfigurationProperties(prefix="threadpool")public class ExecutePoolConfiguration { @Value("${threadpool.core-pool-size}") private int corePoolS...原创 2018-11-16 14:57:00 · 3242 阅读 · 1 评论