2022年2月9日

SpringBoot - Start

摘要: 常用的starter: spring-boot-starter-activemq spring-boot-starter-aop spring-boot-starter-data-redis spring-boot-starter-freemarker spring-boot-starter-thy 阅读全文

posted @ 2022-02-09 16:59 每天积极向上 阅读(109) 评论(0) 推荐(0) 编辑

SpringBoot - 实现声明式事务

摘要: 低版本在启动类(@SpringBootApplication)上加上@EnableTransactionManagement注解 @EnableTransactionManagement注解其实在大多数情况下,不是必须的,因为SpringBoot在 TransactionAutoConfigurat 阅读全文

posted @ 2022-02-09 16:49 每天积极向上 阅读(191) 评论(0) 推荐(0) 编辑

SpringBoot - 实现AOP

摘要: SpringBoot帮我们自动装配了AOP所以我们直接用就行了 @Component @Aspect/*生成代理对象*/ @Order(0) public class LogProxy { @Pointcut(value="execution(* com.levi..*.*(..))") publi 阅读全文

posted @ 2022-02-09 16:38 每天积极向上 阅读(229) 评论(0) 推荐(0) 编辑

Spring boot默认配置文件加载路径

摘要: classpath:表示资源文件加resources,/:表示项目根目录 加载顺序(优先级高的会覆盖优先级低的配置): /config > / > classpath/config > classpath/ 阅读全文

posted @ 2022-02-09 14:52 每天积极向上 阅读(117) 评论(0) 推荐(0) 编辑

导航