首页 > 移动平台 > 详细

springboot整合mybatis错误 Invalid bound statement (not found): com.yuan.mapper.UserMapper.getUserList

时间:2019-11-05 23:14:28      阅读:107      评论:0      收藏:0      [点我收藏+]

出现的原因是 

src文件下的mapper有mapper接口和映射文件,而target下的mapper文件却没有映射文件

技术分享图片      技术分享图片

 

===========================解决方案==================================

 1.把映射文件 放到resources 目录下 结构目录一模一样

 2.在pom.xml中导入以下代码

<build>
        <resources>
            <resource>
                <directory>src/main/java</directory>
                <includes>
                    <include>**/*.properties</include>
                    <include>**/*.xml</include>
                </includes>
                <filtering>false</filtering>
            </resource>
            <resource>
                <directory>src/main/resources</directory>
                <includes>
                    <include>**/*.*</include>
                </includes>
                <filtering>false</filtering>
            </resource>
        </resources>
        <plugins>
            <plugin>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
            </plugin>
        </plugins>
    </build>

 

springboot整合mybatis错误 Invalid bound statement (not found): com.yuan.mapper.UserMapper.getUserList

原文:https://www.cnblogs.com/proyuan/p/11802368.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!