67,513
社区成员
发帖
与我相关
我的任务
分享
Creating a new SqlSession
SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@76ebf212] was not registered for synchronization because synchronization is not active
Creating a new SqlSession
SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@7c61b8bc] was not registered for synchronization because synchronization is not active
Creating a new SqlSession
SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@6aa9548e] was not registered for synchronization because synchronization is not active
JDBC Connection [jdbc:mysql://localhost:3307/ge_test, UserName=root@localhost, MySQL Connector Java] will not be managed by Spring
JDBC Connection [jdbc:mysql://localhost:3307/ge_test, UserName=root@localhost, MySQL Connector Java] will not be managed by Spring
JDBC Connection [jdbc:mysql://localhost:3307/ge_test, UserName=root@localhost, MySQL Connector Java] will not be managed by Spring
<!-- 事务管理器配置 -->
<bean id="txManager" class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
<property name="dataSource" ref="dataSource"></property>
</bean>
<!-- 事务传播特性配置 -->
<tx:advice id="transactionAdvice" transaction-manager="txManager">
<tx:attributes>
<tx:method name="save*" propagation="REQUIRED" rollback-for="Exception"/>
<tx:method name="delete*" propagation="REQUIRED" rollback-for="Exception"/>
<tx:method name="update*" propagation="REQUIRED" rollback-for="Exception"/>
<tx:method name="get*" read-only="true" />
</tx:attributes>
</tx:advice>
<!-- 配置哪些方法参与事务 -->
<aop:config proxy-target-class="true">
<aop:pointcut id="transactionxPointcut" expression="execution(* com.kwjq.web.service.*.*(..))" />
<aop:advisor advice-ref="transactionAdvice" pointcut-ref="transactionxPointcut" />
</aop:config>
<bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource"
destroy-method="close">
<property name="driverClassName" value="${jdbc.driver}" />
<property name="url" value="${jdbc.url}" />
<property name="username" value="${jdbc.username}" />
<property name="password" value="${jdbc.password}" />
<!-- 初始化连接大小 -->
<property name="initialSize" value="10"></property>
<!-- 连接池最大数量 -->
<property name="maxActive" value="50"></property>
<!-- 连接池最大空闲 -->
<property name="maxIdle" value="${jdbc.maxIdle}"></property>
<!-- 连接池最小空闲 -->
<property name="minIdle" value="${jdbc.minIdle}"></property>
<!-- 获取连接最大等待时间 -->
<property name="maxWait" value="${jdbc.maxWait}"></property>
</bean>