Commit ff464827 by gxz

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

同时优化了内部类的创建命名
parent d64ddee6
...@@ -21,7 +21,7 @@ import java.util.Map; ...@@ -21,7 +21,7 @@ import java.util.Map;
@Conditional(MongoCondition.class) @Conditional(MongoCondition.class)
public class MongoDBGeneratorDao implements GeneratorDao { public class MongoDBGeneratorDao implements GeneratorDao {
@Autowired
private MongoDBCollectionFactory mongoDBCollectionFactory; private MongoDBCollectionFactory mongoDBCollectionFactory;
@Override @Override
......
...@@ -301,7 +301,7 @@ public class GenUtils { ...@@ -301,7 +301,7 @@ public class GenUtils {
packagePath += packageName.replace(".", File.separator) + File.separator + moduleName + File.separator; packagePath += packageName.replace(".", File.separator) + File.separator + moduleName + File.separator;
} }
if (template.contains("MongoChildrenEntity.java.vm")) { 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")) { if (template.contains("Entity.java.vm") || template.contains("MongoEntity.java.vm")) {
return packagePath + "entity" + File.separator + className + "Entity.java"; return packagePath + "entity" + File.separator + className + "Entity.java";
...@@ -343,4 +343,9 @@ public class GenUtils { ...@@ -343,4 +343,9 @@ public class GenUtils {
return null; return null;
} }
private static String splitInnerName(String name){
name = name.replaceAll("\\.","_");
return name;
}
} }
...@@ -39,8 +39,8 @@ spring: ...@@ -39,8 +39,8 @@ spring:
# port: 27017 # port: 27017
# auth: false #是否使用密码验证 # auth: false #是否使用密码验证
# username: tincery # username: tincery
# password: Txy123.com # password: renren
# source: tincery_pro # source: 123456
# database: test # database: test
mybatis-plus: 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