In the mybatis framework, the test is carried out in the Dao layer, and the console displays an error: the attribute “resulttype” must be declared for the element type “delete”
The SQL statement of the corresponding. XML file is:
The detailed error messages on the console are:
1. Attribute ‘resulttype’ must be declared for element type ‘Delete’
2.
Check the information on the Internet and say that every_In the sqlmapper.xml file, try to match each SQL statement to a namespace (the complete Java class of each Dao layer); As a result, the attempt was unsuccessful
Finally, simply_Delete the resulttype in the sqlmapper.xml file, and the test is successful; Delete as shown:
Successful test chart:
1 is to get the spring container
2 is the number of deleted data in the test (the number of deleted data in the first test is 1), and this result is the second test
Similar Posts:
- [Solved] Mybatis Error: Invalid bound statement (not found)
- docker: Error response from daemon: Conflict. The container name “/xx” is already in use
- [Solved] Springboot Project mybatis Error: Invalid bound statement (not found)
- Mybatis where 1 = 1 and Tags
- [Solved] Open quote is expected for attribute “name” associ
- How to Solve DeprecationWarning: Passing 1d arrays as data is deprecated in 0.17 and willraise ValueErr…
- Error reporting of console.log in eslint
- How to Delete using INNER JOIN with SQL Server?
- event.srcElement And event.target The difference between
- [Solved] OCI runtime exec failed……executable file not found in $PATH”: unknown