企业🤖AI智能体构建引擎,智能编排和调试,一键部署,支持私有化部署方案 广告
一级缓存是同一个session下的数据共享 ~~~ inputStream = Resources.getResourceAsStream("SqlMapConfig.xml"); SqlSessionFactory sqlSessionFactory = new SqlSessionFactoryBuilder().build(inputStream); SqlSession sqlSession = sqlSessionFactory.openSession(); SuserMapper suserMapper = sqlSession.getMapper(SuserMapper.class); suserMapper.getAllUsers();//发送sql语句 suserMapper.getAllUsers();//不发送sql语句 sqlSession.commit();//缓存清除 System.out.println("aaaa"); suserMapper.getAllUsers();//发送sql语句 ~~~