Commit ff464827 by gxz

解决了使用非Mongo加载相应依赖的问题

同时优化了内部类的创建命名
parent d64ddee6
......@@ -21,7 +21,7 @@ import java.util.Map;
@Conditional(MongoCondition.class)
public class MongoDBGeneratorDao implements GeneratorDao {
@Autowired
private MongoDBCollectionFactory mongoDBCollectionFactory;
@Override
......
......@@ -301,7 +301,7 @@ public class GenUtils {
packagePath += packageName.replace(".", File.separator) + File.separator + moduleName + File.separator;
}
if (template.contains("MongoChildrenEntity.java.vm")) {
return packagePath + "entity" + File.separator + "inner" + File.separator + currentTableName + File.separator + className + "InnerEntity.java";
return packagePath + "entity" + File.separator + "inner" + File.separator + currentTableName+ File.separator + splitInnerName(className)+ "InnerEntity.java";
}
if (template.contains("Entity.java.vm") || template.contains("MongoEntity.java.vm")) {
return packagePath + "entity" + File.separator + className + "Entity.java";
......@@ -343,4 +343,9 @@ public class GenUtils {
return null;
}
private static String splitInnerName(String name){
name = name.replaceAll("\\.","_");
return name;
}
}
......@@ -39,8 +39,8 @@ spring:
# port: 27017
# auth: false #是否使用密码验证
# username: tincery
# password: Txy123.com
# source: tincery_pro
# password: renren
# source: 123456
# database: test
mybatis-plus:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment