|
@@ -16,7 +16,6 @@
|
|
|
package com.baomidou.mybatisplus.core;
|
|
|
|
|
|
import com.baomidou.mybatisplus.core.config.GlobalConfig;
|
|
|
-import com.baomidou.mybatisplus.core.toolkit.GlobalConfigUtils;
|
|
|
import com.baomidou.mybatisplus.core.toolkit.IdWorker;
|
|
|
import org.apache.ibatis.binding.MapperRegistry;
|
|
|
import org.apache.ibatis.logging.Log;
|
|
@@ -83,19 +82,12 @@ public class MybatisConfiguration extends Configuration {
|
|
|
@Override
|
|
|
public void addMappedStatement(MappedStatement ms) {
|
|
|
logger.debug("addMappedStatement: " + ms.getId());
|
|
|
- if (GlobalConfigUtils.isRefresh(ms.getConfiguration())) {
|
|
|
+ if (mappedStatements.containsKey(ms.getId())) {
|
|
|
/*
|
|
|
- * 支持是否自动刷新 XML 变更内容,开发环境使用【 注:生产环境勿用!】
|
|
|
+ * 说明已加载了xml中的节点; 忽略mapper中的SqlProvider数据
|
|
|
*/
|
|
|
- mappedStatements.remove(ms.getId());
|
|
|
- } else {
|
|
|
- if (mappedStatements.containsKey(ms.getId())) {
|
|
|
- /*
|
|
|
- * 说明已加载了xml中的节点; 忽略mapper中的SqlProvider数据
|
|
|
- */
|
|
|
- logger.error("mapper[" + ms.getId() + "] is ignored, because it exists, maybe from xml file");
|
|
|
- return;
|
|
|
- }
|
|
|
+ logger.error("mapper[" + ms.getId() + "] is ignored, because it exists, maybe from xml file");
|
|
|
+ return;
|
|
|
}
|
|
|
super.addMappedStatement(ms);
|
|
|
}
|