重启tomcat测试模块时,restclient响应慢
来源:6-3 登出,注册,校验功能开发
章小熊熊
2017-05-28
看后台报这个
[06:44:38.603][DEBUG][org.mybatis.spring.SqlSessionUtils][http-bio-8088-exec-8] Creating a new SqlSession
[06:44:38.603][DEBUG][org.mybatis.spring.SqlSessionUtils][http-bio-8088-exec-8] SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@1288f074] was not registered for synchronization because synchronization is not active
不过有时候过一会又会正常,请问要怎么解决?
2回答
-
章小熊熊
提问者
2017-05-28
@6c1aa804] was not registered for synchronization because synchronization is not active
[06:47:36.917][DEBUG][o.m.s.t.SpringManagedTransaction][http-bio-8088-exec-10] JDBC Connection [jdbc:mysql://192.168.0.168:3306/mmall_learning?characterEncoding=utf8, UserName=mmall@192.168.0.9, MySQL-AB JDBC Driver] will not be managed by Spring
[06:47:36.917][DEBUG][com.mmall.dao.CategoryMapper.insert][http-bio-8088-exec-10] ==> Preparing: insert into mmall_category (id, parent_id, name, status, sort_order, create_time, update_time) values (?, ?, ?, ?, ?, now(), now())
[06:47:36.919][DEBUG][com.mmall.dao.CategoryMapper.insert][http-bio-8088-exec-10] ==> Parameters: null, 0(Integer), æ°å®¶ç¨çµå¨(String), true(Boolean), null
[06:47:36.928][DEBUG][com.mmall.dao.CategoryMapper.insert][http-bio-8088-exec-10] <== Updates: 1
----这是用restclient模拟get请求新增category时后台的日志显示什么 not be managed by spring,是不是这个引起的插入乱码
00 -
章小熊熊
提问者
2017-05-28
[06:46:16.862][DEBUG][o.m.s.t.SpringManagedTransaction][http-bio-8088-exec-8] JDBC Connection [jdbc:mysql://192.168.0.168:3306/mmall_learning?characterEncoding=utf8, UserName=mmall@192.168.0.9, MySQL-AB JDBC Driver] will not be managed by Spring
过了一会后台显示这个,然后再restclient测试,就可以了。
然而用restclient的localhost:8088/manage/category/add_category.do?parentId=0&categoryName=新家用电器
新加分类,用navicat或者数据库直接连,显示的都为乱码。
我检查了DataSource. properties,里面的db.url=jdbc:mysql://192.168.0.168:3306/mmall_learning?characterEncoding=utf-8,也是utf8,手动用mysql -uroot进入数据库,手动插入一条数据,显示却正常。
不知道乱码的原因是什么?
00
相似问题