SpringMVC 逆向工程的创建 mybatis-generator:generate -e

首先创建maven项目:

SpringMVC 逆向工程的创建 mybatis-generator:generate -e_第1张图片

 

配置IDEA相关依赖和插件:




    4.0.0

    mybits-generator
    com.mybatis.generator
    1.0-SNAPSHOT
    war

    com.mybatis.generator Maven Webapp
    
    http://www.example.com

    
        UTF-8
        1.7
        1.7
        4.3.9.RELEASE
        
        3.4.6
        1.3.2
        
        1.7.25
        1.2.17
        1.3.5
    

    
        
            junit
            junit
            4.11
            test
        
        
        
            org.mybatis
            mybatis
            ${mybatis.version}
        
        
        
            org.mybatis
            mybatis-spring
            ${mybatis-spring.version}
        
        
        
        
        
        
        
        
        
            mysql
            mysql-connector-java
            5.1.40
        
        
            org.mybatis.generator
            mybatis-generator-core
            ${mybatis.generator.version}
        
    

    
        com.mybatis.generator
        
            
                
                    maven-clean-plugin
                    3.0.0
                
                
                
                    maven-resources-plugin
                    3.0.2
                
                
                    maven-compiler-plugin
                    3.7.0
                
                
                    maven-surefire-plugin
                    2.20.1
                
                
                    maven-war-plugin
                    3.2.0
                
                
                    maven-install-plugin
                    2.5.2
                
                
                    maven-deploy-plugin
                    2.8.2
                
                
                
                    org.mybatis.generator
                    mybatis-generator-maven-plugin
                    ${mybatis.generator.version}
                    
                        
                        src/main/resources/personal-generator.xml
                        true
                        true
                    
                
            
        
    

配置personal-generator.xml文件:

SpringMVC 逆向工程的创建 mybatis-generator:generate -e_第2张图片





    
    
    
    
        
            
            
        
        
        
        
        
        
            
        

        
        
            
            
            
            
        
        
        
            
            
        
        
        
            
            
        
        
        

 创建generator.properties文件:

jdbc.driverLocation =  D:\\MAVEN\\repo\\mysql\\mysql-connector-java\\5.1.40\\mysql-connector-java-5.1.40.jar
jdbc.driver=com.mysql.jdbc.Driver
jdbc.url=jdbc:mysql://localhost:3306/taotao?characterEncoding=utf-8
jdbc.username=root
jdbc.password=mysql

设置maven运行命令行:

SpringMVC 逆向工程的创建 mybatis-generator:generate -e_第3张图片

命令行:mybatis-generator:generate -e

最终章节:希望对学习Java的人有所帮助!!!come on !!!

你可能感兴趣的:(java,spring,MVC,MySQL那些事情)