使用eclipse时,编写对象的返回值非常麻烦,而使用返回值快捷键可以简化这一过程。
Resources.getResourceAsStream("mybatis.xml");
new SqlSessionFactoryBuilder().build(resourceAsStream);
factory.openSession();
InputStream resourceAsStream = Resources.getResourceAsStream("mybatis.xml");
SqlSessionFactory factory = new SqlSessionFactoryBuilder().build(resourceAsStream);
SqlSession session = factory.openSession();
原文:https://www.cnblogs.com/bjm1/p/10247269.html