首页 > 其他分享 >statement(not found)异常

statement(not found)异常

时间:2022-09-02 22:33:27浏览次数:57  
标签:xml java pom statement found 异常

mybatis里的异常

statement(not found)

“异常原因是maven工程里默认识别‘resources’包里面的xml,当我们在java包里写的xml则要进行配置”,请看下面步骤

  1. 启动类要覆盖(@MapperScan("com.southwind.mapper")  --  “写自己的路径”)

 

 

2.在pom.xml里配置

 

 

 

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

 

标签:xml,java,pom,statement,found,异常
From: https://www.cnblogs.com/nkcell/p/16651554.html

相关文章