SpringBoot
书读百遍其义自见
Write a cycle of world by code.
展开
-
自定义注解实现记录请求日志
自定义注解实现记录请求日志 创建注解 @Target(ElementType.METHOD) @Retention(RetentionPolicy.RUNTIME) public @interface SysLog { String value() default ""; } 编写切面类 @Aspect @Component @Slf4j public class RequestLogAspect { @Autowired private RequestLogMapper requestL原创 2020-09-09 14:56:11 · 242 阅读 · 0 评论 -
springboot--线程池的 [使用]
1.创建配置类 1.1.修改yml文件,配置线程池相关参数 async: corePoolSize: 10 maxPoolSize: 20 queueCapacity: 300 keepAliveSeconds: 60 threadNamePrefix: do-rabbitMq-push 1.2.创建线程池配置类 import org.springframework.beans.factory.annotation.Value; import org.springframework.c原创 2020-09-03 17:59:22 · 224 阅读 · 0 评论