fix mapper refresh bug
@@ -94,7 +94,6 @@ public class MybatisMapperRefresh implements Runnable {
* @param sleepSeconds
* @param enabled
*/
- @Deprecated
public MybatisMapperRefresh(Resource[] mapperLocations, SqlSessionFactory sqlSessionFactory, int delaySeconds,
int sleepSeconds, boolean enabled) {
this.mapperLocations = mapperLocations.clone();
@@ -151,6 +150,7 @@ public class MybatisMapperRefresh implements Runnable {
public void run() {
if (fileSet == null) {
fileSet = new HashSet<>();
+ if (mapperLocations != null) {
for (Resource mapperLocation : mapperLocations) {
try {
if (ResourceUtils.isJarURL(mapperLocation.getURL())) {
@@ -172,6 +172,7 @@ public class MybatisMapperRefresh implements Runnable {
}
}
}
+ }
try {
Thread.sleep(delaySeconds * 1000);
} catch (InterruptedException interruptedException) {
