a2005147 发表于 2016-11-26 08:53:26

mybatis与spring事物处理日志

o.s.web.servlet.DispatcherServlet - DispatcherServlet with name 'o2o' processing GET request for
o.s.w.s.m.a.DefaultAnnotationHandlerMapping - Matching patterns for request are
o.s.w.s.m.a.DefaultAnnotationHandlerMapping - URI Template variables for request are {id=1}
o.s.w.s.m.a.DefaultAnnotationHandlerMapping - Mapping to HandlerExecutionChain with handler and 2 interceptors
o.s.web.servlet.DispatcherServlet - Last-Modified value for is: -1
o.s.w.b.a.s.HandlerMethodInvoker - Invoking request handler method: public java.lang.String com.lovebuy.o2o.controller.ProductController.get(java.lang.Long,org.springframework.ui.ModelMap)
o.s.b.f.s.DefaultListableBeanFactory - Returning cached instance of singleton bean 'txManager'
//创建一个新事物
o.s.j.d.DataSourceTransactionManager - Creating new transaction with name : PROPAGATION_REQUIRED,ISOLATION_DEFAULT; ''
//获得一个连接
o.s.j.d.DataSourceTransactionManager - Acquired Connection for JDBC transaction
//打开jdbc连接
o.s.j.d.DataSourceTransactionManager - Switching JDBC Connection to manual commit
//创建一个sqlsession
org.mybatis.spring.SqlSessionUtils - Creating a new SqlSession
//在session上注册事物
org.mybatis.spring.SqlSessionUtils - Registering transaction synchronization for SqlSession
o.m.s.t.SpringManagedTransaction - JDBC Connection will be managed by Spring
c.l.o.m.ProductMapper.insertProduct - ==>Preparing: insert into t_product(id, name, price) values (?, ?, ?)
c.l.o.m.ProductMapper.insertProduct - ==> Parameters: 0(Long), ???0(String), 0(Long)
c.l.o.m.ProductMapper.insertProduct - <==    Updates: 1
//在sesssion上的事物先
org.mybatis.spring.SqlSessionUtils - Releasing transactional SqlSession
//从当前事物中取session
org.mybatis.spring.SqlSessionUtils - Fetched SqlSession from current transaction
c.l.o.m.P.selectProductByID - ==>Preparing: select * from t_product where id = ?
c.l.o.m.P.selectProductByID - ==> Parameters: 1(Long)
c.l.o.m.P.selectProductByID - <==      Total: 1
//Releasing transactional SqlSession ?????
org.mybatis.spring.SqlSessionUtils - Releasing transactional SqlSession
//事物提交
org.mybatis.spring.SqlSessionUtils - Transaction synchronization committing SqlSession
//注销事物上的session
org.mybatis.spring.SqlSessionUtils - Transaction synchronization deregistering SqlSession
org.mybatis.spring.SqlSessionUtils - Transaction synchronization closing SqlSession
o.s.j.d.DataSourceTransactionManager - Initiating transaction commit
o.s.j.d.DataSourceTransactionManager - Committing JDBC transaction on Connection
o.s.j.d.DataSourceTransactionManager - Releasing JDBC Connection after transaction
o.s.jdbc.datasource.DataSourceUtils - Returning JDBC Connection to DataSource
o.s.b.f.s.DefaultListableBeanFactory - Invoking afterPropertiesSet() on bean with name '/product'
o.s.web.servlet.DispatcherServlet - Rendering view ] in DispatcherServlet with name 'o2o'
o.s.web.servlet.view.JstlView - Added model object 'product' of type to request in view with name '/product'
o.s.web.servlet.view.JstlView - Added model object 'org.springframework.validation.BindingResult.product' of type to request in view with name '/product'
o.s.web.servlet.view.JstlView - Forwarding to resource in InternalResourceView '/product'
o.s.web.servlet.DispatcherServlet - Successfully completed request
o.s.b.f.s.DefaultListableBeanFactory - Returning cached instance of singleton bean 'sqlSessionFactory'
页: [1]
查看完整版本: mybatis与spring事物处理日志