MyBatis和jdbc关联

InputStream//程序输入流,加载xml文件(定义jdbc链接信息) InputStream in = Demo.class.getResourceAsStream("/MyBatisConfiguration.xml"); SqlSessionFactory sf = new SqlSessionFactoryBuilder().build(in);//导老版本的Mybatis包 SqlSession:封装了jdbc的方法!CURD; SqlSession session = sf.openSession();
posted @ 2018-08-20 11:06  砥砺奋进的几年  阅读(463)  评论(0)    收藏  举报