File tree Expand file tree Collapse file tree 1 file changed +0
-6
lines changed
src/main/java/com/javthon/mybatisgeneratorbestpractice Expand file tree Collapse file tree 1 file changed +0
-6
lines changed Original file line number Diff line number Diff line change 44import lombok .extern .slf4j .Slf4j ;
55import org .mybatis .generator .api .MyBatisGenerator ;
66import org .mybatis .generator .config .Configuration ;
7- import org .mybatis .generator .config .Context ;
87import org .mybatis .generator .internal .DefaultShellCallback ;
98
109import 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 );
You can’t perform that action at this time.
0 commit comments