第二天:小记

  • 报错
// 报错信息
org.apache.ibatis.binding.BindingException: Invalid bound statement (not found): com.taotao.mapper.TbItemMapper.selectByPrimaryKey

// 没有加载 mapper.xml的文件,找不到mapper映射文件,需要在父工程pom.xml添加以下代码
<build>
    <resources>
        <resource>
            <directory>src/main/java</directory>
            <includes>
                <include>**/*.properties</include>
                <include>**/*.xml</include>
            </includes>
            <filtering>false</filtering>
        </resource>
    </resources>   
</build>
  • maven
    • 修改父工程后,需要重新install,因为本地仓库没有

猜你喜欢

转载自blog.csdn.net/weixin_38328290/article/details/87902028