when using Mybatise, I use the following code to operate on the database. No error is reported, and it executes successfully, but the database does not find data
@Test//
public void testInsertUser(){
SqlSession sqlSession = sessionFactory.openSession();
UserMapper userMapper = sqlSession.getMapper(UserMapper.class);
User user = new User(4, "rose", "", 12);
userMapper.insertUser(user);
sqlSession.commit();
sqlSession.close();
};
in the log
solve!
I don"t seem to have such a situation on Google and Baidu. Their similar problem is that they did not commit the transaction, but here I have committed the transaction, but it is still not possible.