The mapper.xml file cannot be found when the SSM project deploys the server

Description of the problem : The ssm project code can run locally on the IDE, but it cannot run after being packaged and placed on the server

local

71f00cf693c94f43a488e1f9bc33e1c5.png

server

571dbd6daa2a4353af3fc9facc2b1ca1.png

 Processing : enter the container, view the log

org.apache.ibatis.binding.BindingException: Invalid bound statement (not found)

2e0ea59846f14658949d220fe08e019e.png

0aef3a8d89f74b69b1a1813b0360c76c.png

Search for the cause of the exception on the Internet 

70

        Originally thought to use maven to compile the project, it does not package the xml files under the java folder by default. but! There is a mapper.xml file in the packaged project

Find the boundary: I found that the jar package that was typed out cannot be run locally. It is finally determined that the xml configuration path of the mapper has a case problem

After changing the case, it's ok 

Guess you like

Origin blog.csdn.net/m0_74421344/article/details/130857573