Difference between Spring MVC and Spring Boot

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

Spring boot error:java.lang.ArrayStoreException: sun.reflect.annotation.TypeNotPresentExceptionProxy

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

How do I POST JSON data with cURL?

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.

UnsatisfiedDependencyException: Error creating bean with name

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

UnsatisfiedDependencyException: Error creating bean with name

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