The problem is that making a change in the service (even adding a white space) gives a ClassCastException:
======
Message: NaamService cannot be cast to NaamService
Caused by: java.lang.ClassCastException: NaamService cannot be cast to NaamService
Class: PersonController
At Line: [12]
Code Snippet:
======
Project attached.
This is an application with a simple service and a scaffolded controller which uses the service.
1) run-app
2) make change in service (add a white space and save)
3) refresh page.
4) See ClassCastException
restart app and all works fine.
"boolean transactional = false"
in the service class, because I suspected it had something to do with the AOP proxy classes that Spring generates, but then I got a different message after modifying the service class:
======
Message: Failed to convert property value of type [TestService] to required type [TestService] for property 'testService'; nested exception is java.lang.IllegalArgumentException: Cannot convert value of type [TestService] to required type [TestService] for property 'testService': no matching editors or conversion strategy found
Caused by: Error creating bean with name 'Test1Controller': Initialization of bean failed; nested exception is org.springframework.beans.TypeMismatchException: Failed to convert property value of type [TestService] to required type [TestService] for property 'testService'; nested exception is java.lang.IllegalArgumentException: Cannot convert value of type [TestService] to required type [TestService] for property 'testService': no matching editors or conversion strategy found
Class: Unknown
At Line: [-1]
Code Snippet:
======