.IllegalArgumentException: Mapped Statements collection does not contain and abnormal [I]

 

After updating the code found in almost all sql queries are being given, like the following:

java.lang.RuntimeException: org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.exceptions.PersistenceException:
### Error querying database.  Cause: java.lang.IllegalArgumentException: Mapped Statements collection does not contain value for myXML.queryUser

 

After investigation we found that the reasons are:

The DataSource spring configuration file, the configuration of the scan path mybatis the xml:

 

In fact, the location of xml file is as follows:

That xml file is not in the sql-config directory, but its subdirectories

 

Solution, modify the configuration file:

 

Guess you like

Origin www.cnblogs.com/libin6505/p/11262519.html