mybaits-plus自定义xml文件位置

1、pom文件引入mybaits-plus依赖

        
        
            com.baomidou
            mybatis-plus-boot-starter
            ${mybatis-plus.version}
        

2、编译资源路径放行

mybaits-plus自定义xml文件位置_第1张图片


        
            
                org.apache.maven.plugins
                maven-compiler-plugin
                
                    ${java.version}
                    ${java.version}
                
            
        

        
            
                src/main/resources
            
            
                src/main/java
                
                    **/*.xml
                
            
        
    

3、application.yml配置

mybaits-plus自定义xml文件位置_第2张图片

mybatis-plus:
  configuration:
    log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
  mapper-locations: classpath*:mapper/*.xml,classpath*:com/cx/project/**/mapping/*.xml

 

你可能感兴趣的:(mybatis-plus)