1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60
| 2022-11-02 23:45:44.194 INFO 7112 --- [ main] c.a.l.m.MybatisplusLearnApplicationTests : 测试乐观锁======start Creating a new SqlSession SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@7d70638] was not registered for synchronization because synchronization is not active 2022-11-02 23:45:44.251 INFO 7112 --- [ main] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Starting... 2022-11-02 23:45:44.869 INFO 7112 --- [ main] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Start completed. JDBC Connection [HikariProxyConnection@1287215032 wrapping com.mysql.cj.jdbc.ConnectionImpl@3cdc7b09] will not be managed by Spring ==> Preparing: INSERT INTO goods ( name, num ) VALUES ( ?, ? ) ==> Parameters: 物品1(String), 100(Long) <== Updates: 1 Closing non transactional SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@7d70638] Creating a new SqlSession Creating a new SqlSession SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@3d4881fa] was not registered for synchronization because synchronization is not active SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@7af5595d] was not registered for synchronization because synchronization is not active JDBC Connection [HikariProxyConnection@1796948188 wrapping com.mysql.cj.jdbc.ConnectionImpl@3cdc7b09] will not be managed by Spring ==> Preparing: SELECT id,name,num,version FROM goods WHERE id=? ==> Parameters: 9(Long) <== Columns: id, name, num, version <== Row: 9, 物品1, 100, 1 <== Total: 1 Closing non transactional SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@3d4881fa] JDBC Connection [HikariProxyConnection@82868218 wrapping com.mysql.cj.jdbc.ConnectionImpl@3cdc7b09] will not be managed by Spring ==> Preparing: SELECT id,name,num,version FROM goods WHERE id=? 2022-11-02 23:45:44.950 INFO 7112 --- [ Thread-2] c.a.l.m.MybatisplusLearnApplicationTests : Thread-2, 保存物品成功,goodsDO=GoodsDO(id=9, name=物品1, num=100, version=1) ==> Parameters: 9(Long) <== Columns: id, name, num, version <== Row: 9, 物品1, 100, 1 <== Total: 1 Closing non transactional SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@7af5595d] 2022-11-02 23:45:44.952 INFO 7112 --- [ Thread-3] c.a.l.m.MybatisplusLearnApplicationTests : Thread-3, 保存物品成功,goodsDO=GoodsDO(id=9, name=物品1, num=100, version=1) Creating a new SqlSession SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@5a7240f4] was not registered for synchronization because synchronization is not active JDBC Connection [HikariProxyConnection@1513447050 wrapping com.mysql.cj.jdbc.ConnectionImpl@3cdc7b09] will not be managed by Spring ==> Preparing: UPDATE goods SET name=?, num=?, version=? WHERE id=? AND version=? ==> Parameters: 物品1(String), 50(Long), 2(Integer), 9(Long), 1(Integer) <== Updates: 1 Closing non transactional SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@5a7240f4] Creating a new SqlSession SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@55205d07] was not registered for synchronization because synchronization is not active JDBC Connection [HikariProxyConnection@829715892 wrapping com.mysql.cj.jdbc.ConnectionImpl@3cdc7b09] will not be managed by Spring ==> Preparing: UPDATE goods SET name=?, num=?, version=? WHERE id=? AND version=? ==> Parameters: 物品1(String), 200(Long), 2(Integer), 9(Long), 1(Integer) <== Updates: 0 Closing non transactional SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@55205d07] Creating a new SqlSession SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@3bfae028] was not registered for synchronization because synchronization is not active JDBC Connection [HikariProxyConnection@393594087 wrapping com.mysql.cj.jdbc.ConnectionImpl@3cdc7b09] will not be managed by Spring ==> Preparing: SELECT id,name,num,version FROM goods WHERE id=? ==> Parameters: 9(Long) <== Columns: id, name, num, version <== Row: 9, 物品1, 50, 2 <== Total: 1 Closing non transactional SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@3bfae028] 2022-11-02 23:45:47.946 INFO 7112 --- [ main] c.a.l.m.MybatisplusLearnApplicationTests : 更新物品数量成功,goodsDO=GoodsDO(id=9, name=物品1, num=50, version=2) 2022-11-02 23:45:47.946 INFO 7112 --- [ main] c.a.l.m.MybatisplusLearnApplicationTests : 测试乐观锁======end 2022-11-02 23:45:47.960 INFO 7112 --- [ionShutdownHook] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Shutdown initiated... 2022-11-02 23:45:47.964 INFO 7112 --- [ionShutdownHook] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Shutdown completed.
进程已结束,退出代码为 0
|