|
@@ -15,7 +15,6 @@
|
|
|
*/
|
|
|
package com.baomidou.mybatisplus.test;
|
|
|
|
|
|
-import java.io.IOException;
|
|
|
import java.io.InputStream;
|
|
|
|
|
|
import org.apache.ibatis.session.SqlSession;
|
|
@@ -47,13 +46,13 @@ public class MybatisMapperRefreshTest {
|
|
|
/**
|
|
|
* 测试 Mybatis XML 修改自动刷新
|
|
|
*/
|
|
|
- public static void main(String[] args) throws IOException, InterruptedException {
|
|
|
+ public static void main(String[] args) throws Exception {
|
|
|
InputStream in = UserMapperTest.class.getClassLoader().getResourceAsStream("mysql-config.xml");
|
|
|
MybatisSessionFactoryBuilder mf = new MybatisSessionFactoryBuilder();
|
|
|
mf.setGlobalConfig(new GlobalConfiguration(new MySqlInjector()));
|
|
|
Resource[] resource = new ClassPathResource[]{new ClassPathResource("mysql/UserMapper.xml")};
|
|
|
SqlSessionFactory sessionFactory = mf.build(in);
|
|
|
- new MybatisMapperRefresh(resource, sessionFactory, 0, 5, true);
|
|
|
+ new MybatisMapperRefresh(sessionFactory, 0, 5, true);
|
|
|
boolean isReturn = false;
|
|
|
SqlSession session = null;
|
|
|
while (!isReturn) {
|