Skip to content

Commit 516b2e2

Browse files
author
Javthon
committed
update
1 parent 1f49faf commit 516b2e2

File tree

1 file changed

+0
-6
lines changed

1 file changed

+0
-6
lines changed

src/main/java/com/javthon/mybatisgeneratorbestpractice/Generator.java

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
import lombok.extern.slf4j.Slf4j;
55
import org.mybatis.generator.api.MyBatisGenerator;
66
import org.mybatis.generator.config.Configuration;
7-
import org.mybatis.generator.config.Context;
87
import org.mybatis.generator.internal.DefaultShellCallback;
98

109
import java.io.InputStream;
@@ -25,11 +24,6 @@ public static void main(String[] args) throws Exception {
2524
log.info("Config file generated");
2625
log.info("Parsing config file, please wait");
2726
Configuration config = cp.parseConfiguration(xml);
28-
Context context = config.getContexts().get(0);
29-
// set package name
30-
context.getJavaModelGeneratorConfiguration(). setTargetProject(context.getJavaModelGeneratorConfiguration().getTargetProject());
31-
context.getSqlMapGeneratorConfiguration().setTargetProject(context.getSqlMapGeneratorConfiguration().getTargetProject());
32-
context.getJavaClientGeneratorConfiguration().setTargetProject(context.getJavaClientGeneratorConfiguration().getTargetProject());
3327
DefaultShellCallback callback = new DefaultShellCallback(overwrite);
3428
MyBatisGenerator myBatisGenerator = new MyBatisGenerator(config, callback, warnings);
3529
myBatisGenerator.generate(null);

0 commit comments

Comments
 (0)