2020年12月1日

Spring - Spring的事务实现方式(编程式事务+声明式事务)

摘要: 总结 声明式事务:非侵入式,本质是AOP,推荐! 编程式事务:侵入式,需要在代码中调用 commit()、rollback()等事务管方法,还需要在代码中通过try catch,不推荐! ①编程式事务管理使用TransactionTemplate。 ②声明式事务管理建立在AOP之上的。其本质是通过A 阅读全文

posted @ 2020-12-01 21:53 frank_cui 阅读(2005) 评论(0) 推荐(0)

Spring - 整合Mybatis和Spring

摘要: 方式一 1-导入mybatis-spring包 2-在application-context.xml中,配置DataSource,SqlSessionFactory,SqlSession 原本,DataSource,SqlSessionFactory,SqlSession都是在mybatis里配置 阅读全文

posted @ 2020-12-01 21:20 frank_cui 阅读(55) 评论(0) 推荐(0)

导航

levels of contents