mybatis cannot find the interface implementation

Encountered a rather strange question:

The whole process of the Junit test can go through, but as soon as the whole project runs, an error is reported after the interface is called, and the binding interface fails.

错误信息:org.apache.ibatis.binding.BindingException: Invalid bound statement (not found) 

The reason is: my xml path is named wrong, resources are written as resources, and s is omitted.

But why Junit can run, but the whole project is started, the interface fails?

At that time, the director explained to me that the packaging mechanisms of junit and maven are different. junit generates .class files, and maven generates jars directly.

I still don't understand it yet. . . . .

Generally, the reasons for the failure to bind an interface are as follows:

1 There is a problem with the scan path of the configuration file

2 There is a problem with the file directory

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325734414&siteId=291194637