springboot 整合mybatis

pom.xml


  4.0.0

  com.zwt
  miaosha
  0.0.1-SNAPSHOT
  jar

  miaosha
  http://maven.apache.org
  
    
        org.springframework.boot
        spring-boot-starter-parent
        2.0.5.RELEASE
    

  
    UTF-8
  

  
  
    
         org.springframework.boot
         spring-boot-starter-web
     
     
        mysql
        mysql-connector-java
        5.1.41
     
     
        com.alibaba
        druid
        1.1.3
     
     
         org.mybatis.spring.boot
        mybatis-spring-boot-starter
        1.3.1
     
    
      junit
      junit
      3.8.1
      test
    
  
  
  
    
        
            
                org.mybatis.generator
                mybatis-generator-maven-plugin
                1.3.5
                
                    
                        mysql
                        mysql-connector-java
                        5.1.41
                    
                
                
                    
                        mybatis generator
                        package
                        
                            generate
                        
                    
                
                
                    false
                    false
                    
                        src/main/resources/mybatis-generator.xml
                    
                
            
        
    
  

mybatis-generator.xml




    
        
            
            
        
        
        
        
        
            
        
        
        
            
            
        
        
        
            
        
        
        
        
            
        
        
        
        

application.properties

server.port=80
mybatis.mapperLocations=classpath:mapping/*.xml

spring.datasource.name=miaosha
spring.datasource.url=jdbc:mysql://127.0.0.1:3306/miaosha?useUnicode=true&characterEncoding=UTF-8
spring.datasource.username=root
spring.datasource.password=123456

spring.datasource.type=com.alibaba.druid.pool.DruidDataSource
spring.datasource.driverClassName=com.mysql.jdbc.Driver

logging.level.com.zwt.miaoshao.dao=debug

你可能感兴趣的:(springboot 整合mybatis)