java.lang.NoSuchMethodException:

Error querying database. Cause: org.apache.ibatis.reflection.ReflectionException: Error instantiating interface zheng.dao.UserMapper with invalid types () or values (). Cause: java.lang.NoSuchMethodException: zheng.dao.UserMapper.()

This kind of error should be due to the lack of a no-parameter construction method in the user entity class. When I first wrote mybatis, this thing worked for an hour. At first I checked the webpage and thought that no no-parameter construction method was written in the entity class, but I did write it myself. , I thought it might be a wrong package guide, I re-built mybatis again in a fit of anger, and then still reported an error, and finally found that there was a problem Insert picture description here
with the return value under UserMapper.xml. Correct the return value later.
Insert picture description here

Guess you like

Origin blog.csdn.net/m0_46217913/article/details/108954187