[ERROR] 2017-01-18 04:37:06:231 cn.dataenergy.common.CenterHandlerExceptionResolver ( CENTERHANDLEREXCEPTIONRESOLVER.JAVA:44)-Uniform catch Exception: Org.mybatis.spring.MyBatisSystemException:nested exception is Org.apache.ibatis.reflection.ReflectionException:There is no getter for property named ' UserId ' in ' class Java.lang.Stri Ng
Before, encountered such a problem is a headache, found that your model object is not missing get method, in fact, I understand wrong, is really the root of the problem is not the model layer, but in the XML, that is, SQL write wrong, if you use MyBatis, I believe we will often encounter such problems, of course, there will be a similar problem, I do not have time to update, later asked to update. In short, with MyBatis, a large part of the problem is from the XML file, if we have this experience, then in the solution of the problem can be quickly and efficiently find the error and solve. This time, although I did not say the specific solution, because these problems are many, but also very simple, I think I teach you to solve the problem, it is better to ask you how to find the problem. The idea below is just one of them.
Cause 1, examine the bean that may be faulted, and if it does not have a GET method, add the Get method to resolve
Cause 2, cause 1 No problem, it is possible that the error is the corresponding XML file error, generally, when there is only one query condition, should write the Where condition, userid={value}, when the query condition has more than one time, generally we put him in a *reqbean, The fields in this bean should correspond to the Sql-where field one by one above the XML file.
There is no getter for property named ' UserId ' in ' Class java.lang.String '