`
xly_971223
  • 浏览: 1262528 次
  • 性别: Icon_minigender_1
  • 来自: 北京
社区版块
存档分类
最新评论

mybatis与spring事物处理日志

阅读更多
   o.s.web.servlet.DispatcherServlet - DispatcherServlet with name 'o2o' processing GET request for [/o2o/product_1.html]
   o.s.w.s.m.a.DefaultAnnotationHandlerMapping - Matching patterns for request [/product_1.html] are [/product_{id}.*, /product_{id}]
   o.s.w.s.m.a.DefaultAnnotationHandlerMapping - URI Template variables for request [/product_1.html] are {id=1}
   o.s.w.s.m.a.DefaultAnnotationHandlerMapping - Mapping [/product_1.html] to HandlerExecutionChain with handler [com.lovebuy.o2o.controller.ProductController@bdbf8] and 2 interceptors
   o.s.web.servlet.DispatcherServlet - Last-Modified value for [/o2o/product_1.html] 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 [com.lovebuy.o2o.service.ProductService.getProduct]: PROPAGATION_REQUIRED,ISOLATION_DEFAULT; ''
   //获得一个连接
   o.s.j.d.DataSourceTransactionManager - Acquired Connection [jdbc:mysql://localhost:6/o2o?useUnicode=true&characterEncoding=UTF-8&zeroDateTimeBehavior=convertToNull, UserName=root@localhost, MySQL-AB JDBC Driver] for JDBC transaction
   //打开jdbc连接
   o.s.j.d.DataSourceTransactionManager - Switching JDBC Connection [jdbc:mysql://localhost:6/o2o?useUnicode=true&characterEncoding=UTF-8&zeroDateTimeBehavior=convertToNull, UserName=root@localhost, MySQL-AB JDBC Driver] to manual commit
   //创建一个sqlsession
   org.mybatis.spring.SqlSessionUtils - Creating a new SqlSession
   //在session上注册事物
   org.mybatis.spring.SqlSessionUtils - Registering transaction synchronization for SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@af]
   o.m.s.t.SpringManagedTransaction - JDBC Connection [jdbc:mysql://localhost:6/o2o?useUnicode=true&characterEncoding=UTF-8&zeroDateTimeBehavior=convertToNull, UserName=root@localhost, MySQL-AB JDBC Driver] 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 [org.apache.ibatis.session.defaults.DefaultSqlSession@af]
   //从当前事物中取session
   org.mybatis.spring.SqlSessionUtils - Fetched SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@af] 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.apache.ibatis.session.defaults.DefaultSqlSession@af]
   //事物提交
   org.mybatis.spring.SqlSessionUtils - Transaction synchronization committing SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@af]
   //注销事物上的session
   org.mybatis.spring.SqlSessionUtils - Transaction synchronization deregistering SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@af]
   org.mybatis.spring.SqlSessionUtils - Transaction synchronization closing SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@af]
   o.s.j.d.DataSourceTransactionManager - Initiating transaction commit
   o.s.j.d.DataSourceTransactionManager - Committing JDBC transaction on Connection [jdbc:mysql://localhost:6/o2o?useUnicode=true&characterEncoding=UTF-8&zeroDateTimeBehavior=convertToNull, UserName=root@localhost, MySQL-AB JDBC Driver]
   o.s.j.d.DataSourceTransactionManager - Releasing JDBC Connection [jdbc:mysql://localhost:6/o2o?useUnicode=true&characterEncoding=UTF-8&zeroDateTimeBehavior=convertToNull, UserName=root@localhost, MySQL-AB JDBC Driver] 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 [org.springframework.web.servlet.view.JstlView: name '/product'; URL [/WEB-INF/jsp//product.jsp]] in DispatcherServlet with name 'o2o'
   o.s.web.servlet.view.JstlView - Added model object 'product' of type [com.lovebuy.o2o.entity.Product] to request in view with name '/product'
   o.s.web.servlet.view.JstlView - Added model object 'org.springframework.validation.BindingResult.product' of type [org.springframework.validation.BeanPropertyBindingResult] to request in view with name '/product'
   o.s.web.servlet.view.JstlView - Forwarding to resource [/WEB-INF/jsp//product.jsp] 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 楼 最后的攻城狮 2016-10-18  
这也太乱了

相关推荐

    spring整合mybatis(非springMVC)

    简单的spring整合mybatis,包含事务管理,日志输出

    mybatis3.25整合spring3.25注解事务

    mybatis3.25整合spring3.25采用注解的方式加载bean,带增删改查例子,文件上传例子,翻页例子,翻页样式20多种,更改样式只需要替换翻页div的css样式名,applicationxml注释了详细的说明,mybatis持久层有ObeectBean方式和...

    Struts2SpringMybatis 增删改查

    Struts2SpringMybatis 增删改查,里面的Struts2,spring,Mybatis配置文件都是模块化的管理,实现了社会版本的配置,不再是个人玩弄的小项目。具体的 sql语句也已经加到了WEBRROT目录下面了,自己下载下来可以详细看...

    SpringBatch+Spring+Mybatis+MySql (spring batch 使用jar)

    Spring Batch可以提供大量的,可重复的数据处理功能,包括日志记录/跟踪,事务管理,作业处理统计工作重新启动、跳过,和资源管理等重要功能。 业务方案: 1、批处理定期提交。 2、并行批处理:并行处理工作。 3、...

    Spring+struts2+mybatis3环境配置

    搭建的一个SSM开发环境,包括事务回滚,日志记录等。欢迎下载

    struct2.3+spring3.1+mybatis3.3+axis2

    公司项目需要,搭建了SSM框架,当初想更好的熟悉SSM框架的架构及其原理,所以未使用maven,资源中包括所有的jar包,能直接运行在tomcat服务器,框架中使用了Spring的自动扫描,注解注入,AOP异常日志记录,AOP事务,...

    Spring Boot实战与原理分析视频课程包含14-18

    --多种数据源的配置、JdbcTemplate、事务的处理 20 Spring Boot AOP 21 Spring Boot Starter18:31 --快速构建自定义的Spring Boot Starter 22 Spring Boot 日志30:58 --演示了如何在Spring Boot里面使用日志配置...

    spring+mybatis的helloworld项目

    提供完整框架,基于maven,实现mysql插入功能(内涵数据库脚本),log4j输出日志,实现简单事务管理

    SpringBoot+Mybatis实现数据源动态切换

    springboot实现数据源动态切换 注意事项: 1. 该demo采用yml配置数据库信息,注意url标签为jdbc-url 2.项目中加了日志输出...3.在Service中应用事务时,自定义的注解将失效,解决办法:可将注解配置到Controller方法中

    spring boot2.0以上版本整合mybatis+pagehelper+druid

    2)配置数据库连接、配置 Spring 事务 3)配置加载配置文件的读取,开启注解 4)配置日志文件 … n) 配置完成之后部署 tomcat 调试 可能你还需要考虑各个版本的兼容性,jar 包冲突的各种可行性。 那么使用 ...

    基于SpringCloud+Oauth2+MyBatis+ES+Docker+Kubernetes的商城系统项目源码数据.rar

    基于SpringCloud+Oauth2+MyBatis+Elasticsearch+Docker+Kubernetes的商城系统项目源码+数据 核心功能: 平台管理端:商品管理、订单管理、会员管理、促销管理、店铺管理、运营管理、统计分析、系统设置、日志系统。 ...

    spring-boot mybaits spring security redis整合

    Transtraction注解Jta事务。 3、MVC ====== 基于spring mvc注解。Exception统一管理。 spring security权限管理。 aop日志记录。 4、调度 ====== Spring task, 可以查询已经注册的任务。立即执行一次任务。 ...

    SpringMVC、Mybatis、Hibernate、Bootstrap、jQuery、HTML5、SpringSecurity、Lucene、Ehcache

    后端主要技术:Spring 4.1.5(管理事务)、Spring MVC 4.1.5(作为控制层)、Spring Security 4.0.0(认证和授权,权限管理)、Hibernate 4.3.8(作为数据持久层)、MyBatis 3.2.8(作为数据持久层)、Hibernate Search 5.1.0...

    基于SpringBoot+Vue+MyBatis+Shiro开发的后台权限管理系统,敏捷开发系统架构,界面简洁美观

    核心技术采用Spring、MyBatis、Shiro没有任何其它重度依赖。 互联网云快速开发框架,微服务分布式代码生成的敏捷开发系统架构。项目代码简洁,注释丰富,上手容易,还同时集中分布式、微服务,同时包含许多基础模块和监控...

    Java整合SSM框架

    其他与MyBatis相关的库,如mybatis-spring-x.x.x.jar,用于整合Spring和MyBatis。 数据库连接和事务管理的jar包: 例如mysql-connector-java-x.x.x-bin.jar(根据实际使用的数据库类型选择相应的驱动)。 日志和...

    spring-boot mybaits shiro redis整合

    Transtraction注解Jta事务。 3、MVC ====== 基于spring mvc注解。Exception统一管理。 shiro权限管理。 aop日志记录。 4、调度 ====== Spring task, 可以查询已经注册的任务。立即执行一次任务。 5、缓存和...

    基于Spring+Struts+Mybatis的B2C电子商务网站系统源码+项目说明.zip

    - service(所有的系统服务都,主要有Spring就行事务的管理) - util(工具包) - web(主要是作为前端控制器,由struts实现) 在resource目录下的文件结构如下: - mysql/xxshop.sql(存放创建数据库的sql...

    基于SpringBoot+Shiro+Redis+Jwt+Thymeleaf+MyBatis 开发的后台用户、角色+源代码+文档

    * 增加事务测试样例,详见AdminController的save方法,此坑很深,爬了一天,由于没有对spring事务的深入了解,导致事务一直不成功,原因在于spring事务只能处理没有被捕获的异常信息,如果对方法增加了事务,请尽量...

    spring boot 全面的样例代码

    - chapter9-2-2:[Spring Boot与Dubbo中管理服务依赖] ### Spring Cloud构建微服务架构 由于Spring Cloud偏宏观架构,Spring Boot偏微观细节,内容上越来越多,为了两部分内容不互相干扰,所以迁移Spring Cloud...

    Java源码 SpringMVC Mybatis Shiro Bootstrap Rest Webservice

    1. Springmvc + Mybatis集成、SpringSecurity权限控制、Spring AOP事务处理。 2. Wink Rest服务、Webservice服务:jaxws、CXF等 3. IO 流上传下载文件,多线程操作 4. 发送邮件,配置邮件服务器,发基于html、纯...

Global site tag (gtag.js) - Google Analytics