Oracle database insertion problem of Mybatise

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

clipboard.png
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.

Feb.28,2021

found the reason why the
Mabitis associated interface operates the database. In the mapper.xml mapping file, I wrote the < insert > < / insert > tag as the < select > < / select > tag, which did not report an error, but did not return the number of rows changed

.

@Test//
    public void testInsertUser(){
        int row = 0;
        SqlSession sqlSession = sessionFactory.openSession();
        UserMapper userMapper = sqlSession.getMapper(UserMapper.class);
        User user = new User(6, "rose", "", 12);
        row = userMapper.insertUser(user);//null
        sqlSession.commit();
        sqlSession.close();
        System.out.println(row);
    };

because it is a query tag, natural data will not be submitted

Menu