//MybatisTestor.java 中的代码
Exception SqlSession sqlSession = sqlSession = MybatisUtils.TGoods goods = sqlSession.selectOneSystem..printlngoods.hashCodeSystem..printlngoods.getTitleException ee.printStackTraceMybatisUtils.sqlSessionsqlSession = MybatisUtils.TGoods goods = sqlSession.selectOneSystem..printlngoods.hashCodeException ee.printStackTraceMybatisUtils.sqlSession
select from t_goods
where goods_id = value
<property name="driver" value="com.mysql.jdbc.Driver"/>
日志
2022-05-24 11:59:39.789 [main] DEBUG goods - Cache Hit Ratio [goods]: 0.0
2022-05-24 11:59:39.796 [main] DEBUG o.a.i.t.jdbc.JdbcTransaction - Opening JDBC Connection
2022-05-24 11:59:40.228 [main] DEBUG o.a.i.d.pooled.PooledDataSource - Created connection 1223867739.
2022-05-24 11:59:40.228 [main] DEBUG o.a.i.t.jdbc.JdbcTransaction - Setting autocommit to false on JDBC Connection [com.mysql.jdbc.JDBC4Connection@48f2bd5b]
2022-05-24 11:59:40.268 [main] DEBUG goods.selectById - ==> Preparing: select * from t_goods where goods_id = ?
2022-05-24 11:59:40.331 [main] DEBUG goods.selectById - ==> Parameters: 741(Integer)
2022-05-24 11:59:40.382 [main] DEBUG goods.selectById - <== Total: 1
921420643
斯利安 孕妈专用 洗发水 氨基酸表面活性剂 舒缓头皮 滋养发根 让你的秀发会喝水 品质孕妈
2022-05-24 11:59:40.384 [main] DEBUG goods - Cache Hit Ratio [goods]: 0.0
2022-05-24 11:59:40.384 [main] DEBUG o.a.i.t.jdbc.JdbcTransaction - Opening JDBC Connection
2022-05-24 11:59:40.447 [main] DEBUG o.a.i.d.pooled.PooledDataSource - Created connection 1010953501.
2022-05-24 11:59:40.447 [main] DEBUG o.a.i.t.jdbc.JdbcTransaction - Setting autocommit to false on JDBC Connection [com.mysql.jdbc.JDBC4Connection@3c41ed1d]
2022-05-24 11:59:40.453 [main] DEBUG goods.selectById - ==> Preparing: select * from t_goods where goods_id = ?
2022-05-24 11:59:40.454 [main] DEBUG goods.selectById - ==> Parameters: 741(Integer)
2022-05-24 11:59:40.463 [main] DEBUG goods.selectById - <== Total: 1
943870983
恭喜解决一个难题,获得1积分~
来为老师/同学的回答评分吧
0 星