Difference between Spring and Spring Boot

In short Spring Boot reduces the need to write a lot of configuration and boilerplate code. It has an opinionated view on Spring Platform and third-party libraries so you can get started with minimum effort. Easy to create standalone applications with embedded Tomcat/Jetty/Undertow. Provides metrics, health checks, and externalized configuration. You can read more here … Read more

HTTP status code when single request asks for too large resource or too many of them

403 sounds like the most appropriate choice. It basically says “nu-uh. You don’t get to see that.”, which is pretty much the case here. 10.4.4 403 Forbidden The server understood the request, but is refusing to fulfill it. Authorization will not help and the request SHOULD NOT be repeated. […] Of course, it’d be a … Read more

How to implement a RESTful resource for a state machine or finite automata

The update action (PUT method) is not appropriate because PUT is suppose to be idempotent. The only this would be possible is if the state was sent as part of the representation. This is inconsistet with an “event”. Is this correct? Correct. Since, events aren’t idempotent, then the a POST must be used. But, to … Read more

How to make a async REST with Spring?

The response body is blank because the @Async annotation is used at findEmail method of UserRepository class, it means that there is no data returned to the following sentence User user = userRepository.findByEmail(email); because findByEmail method is running on other different thread and will return null instead of a List object. The @Async annotation is … Read more

tech