Neither BindingResult nor plain target object for bean name available as request attribute
In the controller, you need to add the login object as an attribute of the model: Like this:
In the controller, you need to add the login object as an attribute of the model: Like this:
Spring MVC is a complete HTTP oriented MVC framework managed by the Spring Framework and based in Servlets. It would be equivalent to JSF in the JavaEE stack. The most popular elements in it are classes annotated with @Controller, where you implement methods you can access using different HTTP requests. It has an equivalent @RestController to implement REST-based APIs. … Read more
The solution can vary based on actual incompatibility root cause. The best way how to investigate such the issue is to follow this line: and put breakpoint into constructor of class ‘TypeNotPresentExceptionProxy’ (there is only one). After execution in debug mode you should see what exactly is wrong and based on your findings you can … Read more
You need to set your content-type to application/json. But -d (or –data) sends the Content-Type application/x-www-form-urlencoded, which is not accepted on Spring’s side. Looking at the curl man page, I think you can use -H (or –header): Full example: (-H is short for –header, -d for –data) Note that -request POST is optional if you use -d, as the -d flag implies a POST request. On Windows, things are slightly different. See the comment thread.
The ClientRepository should be annotated with @Repository tag. With your current configuration Spring will not scan the class and have knowledge about it. At the moment of booting and wiring will not find the ClientRepository class. EDIT If adding the @Repository tag doesn’t help, then I think that the problem might be now with the ClientService and ClientServiceImpl. Try to annotate the ClientService (interface) with @Service. … Read more
The ClientRepository should be annotated with @Repository tag. With your current configuration Spring will not scan the class and have knowledge about it. At the moment of booting and wiring will not find the ClientRepository class. EDIT If adding the @Repository tag doesn’t help, then I think that the problem might be now with the ClientService and ClientServiceImpl. Try to annotate the ClientService (interface) with @Service. … Read more
i found that in the deployment assembly, there was the entry: i removed it, and added the maven dependencies entry, and it works fine now.
After straining my eyes for while I changed this line to That worked like a charm. Thankyou all
The solution is: I explicitly set the below property to none in application.yml file.