请稍等 ...
×

采纳答案成功!

向帮助你的同学说点啥吧!感谢那些助人为乐的人

重启tomcat测试模块时,restclient响应慢

看后台报这个

[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

不过有时候过一会又会正常,请问要怎么解决?

正在回答 回答被采纳积分+3

2回答

提问者 章小熊熊 2017-05-28 07:39:51

@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,是不是这个引起的插入乱码

0 回复 有任何疑惑可以回复我~
提问者 章小熊熊 2017-05-28 06:50:14

[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进入数据库,手动插入一条数据,显示却正常。

不知道乱码的原因是什么?

0 回复 有任何疑惑可以回复我~
问题已解决,确定采纳
还有疑问,暂不采纳
微信客服

购课补贴
联系客服咨询优惠详情

帮助反馈 APP下载

慕课网APP
您的移动学习伙伴

公众号

扫描二维码
关注慕课网微信公众号