mybatis逆向工程实现

引入的pom文件



  
    dev-tools
    com.ai.shanghai.material
    1.0.0-SNAPSHOT
  
  4.0.0

  mybatis-generator

  
    UTF-8
    UTF-8
    1.8

    ${project.basedir}/lib/ojdbc6-11.2.0.3.jar
    oracle.jdbc.OracleDriver
    
    
  
  
    
      com.alibaba
      druid
    
    
      com.oracle
      ojdbc6
      11.2.0.3
    
    
      mysql
      mysql-connector-java
    
  
  
    
      
        org.mybatis.generator
        mybatis-generator-maven-plugin
        1.3.5
        
          
          true
          true
          ${basedir}/src/main/resources/generatorConfig.sample.xml
          ${basedir}/src/main/java
        
        
          
            Generate MyBatis Artifacts
            
              generate
            
          
        
      
    
  

 

在resource中配置xml文件

x






  
  
  
    
        
        
        
    
    
    
    
      
      
    

    
      
    

    
      
    
    
    
    
配置文件生成目录
#model.package = com.ai.mine.dao.model
#model.target = D:\\IdeaProjects\\dev_tools\\model
#
#mapxml.package = sqlmapper.system
#mapxml.target = D:\\IdeaProjects\\dev_tools\\mapperX
#
#mapper.package = com.ai.mine.dao.mapper
#mapper.target = D:\\IdeaProjects\\dev_tools\\mapperJ

model.package = com.ai.mine.system.dao.model
model.target = D:\\git\\dev-tools\\model

mapxml.package = sqlmapper
mapxml.target = D:\\git\\dev-tools\\mapperX

mapper.package = com.ai.mine.dao.mapper
mapper.target = D:\\git\\dev-tools\\mapperJ

打包maven启动  install执行jar

你可能感兴趣的:(java,mybatis)