目录

工欲善其事

实践出真知

活跃标签: linux java mysql 待分类 js springboot win10 电路 vue macOS nginx windows esp32 git docker idea maven esp8266 python Arduino

存档:

Maven 配置之编译不给你加载xml文件

在使用MybatisPlus插件时普通增删改茶泡的好好的,自己写了一个方法就不行了报错!

Invalid bound statement (not found): org.minimalist.modules.user.mapper.SysUserMapper.findUserByUserName

其实这边是在tager中找不到那个xml文件造成的,解决这个问题可以通过配置maven来解决

<build>
        <resources>
            <resource>
                <directory>src/main/java</directory>
                <includes>
                    <include>**/*.xml</include>
                </includes>
                <filtering>false</filtering>
            </resource>
        </resources>
    </build>

在build加上上边代码,clean后在重启看看有没有吧,不过我这边也配置了yml文件

mybatis-plus:
  mapper-locations: classpath*:org/minimalist/modules/**/mapper/xml/*Mapper.xml

不知道管不管用,不过页没出什么问题


标题:Maven 配置之编译不给你加载xml文件
作者:llilei
地址:http://solo.llilei.work/articles/2022/02/19/1645275330494.html