spring
神龙飞仙
it爱好者
展开
-
spring aop拦截指定方法和自定义注解
1、使用aop需要加入maven依赖 <!--与aop相关--> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-aop</artifac...原创 2020-03-29 22:09:42 · 14289 阅读 · 7 评论 -
spring声明式事务和编程式事务
spring声明式事务和编程式事务spring事务:只对本地事务有效。1)声明式事务:添加注解@Transactional即可@Target({ElementType.METHOD, ElementType.TYPE})@Retention(RetentionPolicy.RUNTIME)@Inherited@Documentedpublic @interface Transacti...原创 2020-03-29 20:10:14 · 339 阅读 · 0 评论