public class SqlSessionFac {
private static SqlSessionFactory sqlSessionFactory;
private SqlSessionFac() {
}
public static SqlSessionFactory getSSF(){
InputStream inputStream= null;
try {
inputStream = Resources.getResourceAsStream("mybatis-config.xml");
} catch (IOException e) {
e.printStackTrace();
}
sqlSessionFactory = new SqlSessionFactoryBuilder().build(inputStream);
return sqlSessionFactory;
}
}
标签:sqlSessionFactory,放到,SqlSessionFactory,private,inputStream,sqlsessionfactory,sta
From: https://www.cnblogs.com/Liku-java/p/17040841.html