org.apache.ibatis.binding.BindingException: Invalid bound statement (not found): com.xx.springboot.mapper.UserMapper.Select


springboot+mybatisplus使用xml找不到mapper的解决办法

在application.xml 配置

mybatis.mapper-locations=classpath*:/com/xx/springboot/mapper/*.xml


pom.xml 配置

<build>
        <plugins>
            <plugin>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
            </plugin>
        </plugins>
        <resources>
            <!--引入mapper对应的xml文件-->
            <resource>
                <directory>src/main/java</directory>
                <includes>
                    <include>**/*.xml</include>
                </includes>
            </resource>
        </resources>
    </build>

相关文章:

  • 2021-07-17
  • 2021-10-23
  • 2022-12-23
  • 2021-10-10
  • 2021-04-09
  • 2021-07-29
  • 2021-07-06
  • 2021-08-05
猜你喜欢
  • 2021-12-16
  • 2021-06-04
  • 2021-09-16
  • 2022-12-23
  • 2021-09-28
  • 2022-12-23
  • 2021-04-04
相关资源
相似解决方案