摘要: <!-- 使用annotation注解方式配置事务 --> <tx:annotation-driven transaction-manager="transactionManager"/> 阅读全文
posted @ 2017-03-23 16:51 一念花开满天下 阅读(308) 评论(0) 推荐(0) 编辑
摘要: <!-- 配置SqlSessionTemplate --> <bean id="sqlSessionTemplate" class="org.mybatis.spring.SqlSessionTemplate"> <!-- 通过构造函数注入 --> <constructor-arg name="sq 阅读全文
posted @ 2017-03-23 14:55 一念花开满天下 阅读(38317) 评论(0) 推荐(1) 编辑
摘要: 1.首先通过dataSource来配置sessionFactory <!--读入配置文件 --> <bean id="propertyConfigurer" class="org.springframework.beans.factory.config.PropertyPlaceholderConf 阅读全文
posted @ 2017-03-23 14:16 一念花开满天下 阅读(3252) 评论(0) 推荐(0) 编辑
摘要: <context:annotation-config> 是用于激活那些已经在spring容器里注册过的bean上面的注解。该标签主要向容器中掩式定的注了 AutowiredAnnotationBeanPostProcessor CommondAnnotationBeanPostProcessor P 阅读全文
posted @ 2017-03-23 13:43 一念花开满天下 阅读(175) 评论(0) 推荐(0) 编辑
摘要: XML配置多多源文件: 整合数据源用到的 阅读全文
posted @ 2017-03-23 11:12 一念花开满天下 阅读(220) 评论(0) 推荐(0) 编辑
摘要: #=======================mysql============================= #jdbc.driverClassName=com.mysql.jdbc.Driver #jdbc.url=jdbc:mysql://localhost:3306/operationLog #jdbc.username=root #jdbc.password=ROOT #====... 阅读全文
posted @ 2017-03-23 11:05 一念花开满天下 阅读(745) 评论(0) 推荐(0) 编辑
摘要: 首先spring并不直接管理事物,而是提供了多种事物管理器,他们将事务管理的职责委托给Hibernate或者JTA等持久化机制所提供的相关平台框架的事务来实现。 Spring管理事物的接口是org.springframework.transaction.PlatformTransactionMana 阅读全文
posted @ 2017-03-23 10:17 一念花开满天下 阅读(230) 评论(0) 推荐(0) 编辑