Mybatis逆向工程代码

generatorConfig.xml

    
    
    
        
    
    
    
        
        
        
        
    
    
    
        
        
    
    
    
        
        
    
    
    

Test测试
List warnings = new ArrayList();
boolean overwrite = true;
File configFile = new File(“src/generatorConfig.xml”);
ConfigurationParser cp = new ConfigurationParser(warnings);
Configuration config;
config = cp.parseConfiguration(configFile);
DefaultShellCallback callback = new DefaultShellCallback(overwrite);
MyBatisGenerator myBatisGenerator = new MyBatisGenerator(config, callback, warnings);
myBatisGenerator.generate(null);

你可能感兴趣的:(java)