springboot
文章平均质量分 71
枫灵小宇
这个作者很懒,什么都没留下…
展开
-
springboot 实现定时任务(Schedule)
文章目录1.主启动类(@EnableScheduling)2.定时任务实现方式1.注解(@Scheduled)2.接口(实现SchedulingConfigurer)3.多线程(@Async:可以标注在类和方法上)3.cron表达式1.表格2.特殊字符说明3.示例 1.主启动类(@EnableScheduling) @SpringBootApplication @EnableScheduling // 开启定时任务功能 @EnableAsync // 开启多线程定时任务 public class Appli原创 2020-10-20 16:02:31 · 498 阅读 · 0 评论 -
springboot整合AOP
文章目录1.AOP使用场景2.pom依赖3.自定义注解3.AOP切面3.1.execution表达式3.2.通知4.执行顺序测试4.1.测试类4.2.测试结果 1.AOP使用场景 日志记录 权限控制 缓存处理 监控 事务处理 … 2.pom依赖 <!--aop--> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-s原创 2020-10-13 21:26:17 · 152 阅读 · 0 评论 -
spring-boot自定义注解,解析自定义注解的属性值,配置文件的参数值
文章目录1.配置文件2.注解3.切面AOP4.测试 1.配置文件 test.key=testValue 2.注解 package com.qin.annotation; import java.lang.annotation.*; @Target({ElementType.FIELD, ElementType.METHOD, ElementType.PARAMETER, ElementType.ANNOTATION_TYPE}) @Retention(RetentionPolicy.RUNTIME)原创 2020-10-12 19:31:59 · 1859 阅读 · 3 评论