Springboot整合Mybatis有感

搭建环境时,遇到了一些问题,写下来便于以后查看

1:如果你想把mapper放在java目录下你需要配置2个地方

 配置文件,我忘记加了s,导致很坑

mybatis:
  #mapper-locations: classpath:mapping/*Mapper.xml
  mapper-locations: classpath:/com/ims/sso/impl/dao/mapper/*Mapper.xml

POM文件

 
    
      
        org.mortbay.jetty
        maven-jetty-plugin
        6.1.7
        
          
            
              8888
              30000
            
          
          ${project.build.directory}/${pom.artifactId}-${pom.version}
          /
        
      
    
    
      
        src/main/java
        
          **/*.xml
        
        false
      
    
  

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