摘要: 注解名 说明 @Configuration 声明一个配置类,配置类的功能等同 spring 的配置文件(重点) @Bean 将没有声明 @Component/@Controller/@Serivce/@Repository 的类加入到 Spring 容器等同于 Spring 配置文件的<bean>标 阅读全文
posted @ 2019-09-03 20:50 ___mouM 阅读(162) 评论(0) 推荐(1) 编辑
摘要: ssh ssm都有事务管理service层通过applicationContext.xml配置,所有service方法都加上事务操作; 用来保证一致性,即service方法里的多个dao操作,要么同时成功,要么同时失败; springboot下的话,在service方法上加上@Transaction 阅读全文
posted @ 2019-09-03 20:36 ___mouM 阅读(426) 评论(0) 推荐(2) 编辑