• 无效的绑定声明(未找到)包名.mapper.XXXMapper.方法。IDEA中接口与映射文件未在一起问题


    出现该类问题是只找到了接口未找到映射文件;

    解决办法一:

    将映射文件存放在resources下,要求包名与接口的包名一致;

    解决方法二:

    在接口所在的module中的pom.xml文件下添加依赖

    <!-- 如果不添加此节点mybatis的mapper.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>**/*.properties</include>
                        <include>**/*.xml</include>
                    </includes>
                    <filtering>false</filtering>
                </resource>
      </resources>
    </build>        
    

      

  • 相关阅读:
    poj3660 最短路/拓扑序
    poj1502 最短路
    poj3259 最短路判环
    poj1680 最短路判环
    一些自己常用的cdn
    bower
    vuejs点滴
    jquery的ajax
    jquery点滴
    githubpage+hexo构建自己的个人博客
  • 原文地址:https://www.cnblogs.com/zandz/p/8654184.html
Copyright © 2020-2023  润新知