低级错误-mybatisPlus配置xml路径错误

错误提示

org.apache.ibatis.binding.BindingException: Invalid bound statement (not found): com.****.springcloud.mapper.PaymentMapper.getPaymentById

错误原因

在这里插入代码片

解决方案

//方案1  不喜将mapper.xml全部放在resource中的使用这种方式
   <build>
        <resources>
            <resource>
                <directory>src/main/resources</directory>
                <filtering>true</filtering>
            </resource>
            <resource>
                <directory>src/main/java</directory>
                <includes>
                    <include>**/*.xml</include>
                </includes>
            </resource>
        </resources>
    </build>
//方案2
将mapper.xml放入resource中

猜你喜欢

转载自blog.csdn.net/qq_38438909/article/details/107133791
今日推荐