>PROBLEM
Running spring and thymeleaf, returns the following error page:
Whitelabel Error Page
This application has no explicit mapping for /error, so you are seeing this as a fallback.
Thu Jul 06 17:16:04 BRT 2017
There was an unexpected error (type=Internal Server Error, status=500).
Error during execution of processor 'org.thymeleaf.spring4.processor.attr.SpringInputGeneralFieldAttrProcessor' (login)
>SOLUTION
Since the log is pointing to login, open the class which should have the respective attribute.
To find out, go to the page which is returning the error. The page may be found in the controller.
In this example we get:
@RequestMapping(value = "/", method = RequestMethod.GET)
public String addNewLogin(Login login) {
return "login";
}
In this example is "th:object="${login}".
The error message means that the parser is complaining that it was not found the attribute login for Login class.
Opening the respective Login class, you get instead of "login" the "signin" attribute.
]
Switch the wrong attribute by the correct one, as below:
Now refresh page, and that's it! :-)
>ENV
Java
Spring boot
Thymeleaf
Eclipse
No comments:
Post a Comment