Tag: spring-boot

  • Working with Hibernate in a multi-threaded application

    Some of my learnings while working with Hibernate in a multi-threaded Spring Boot application. Multiple sessions When you start an @Async method, it runs in its own thread managed by Spring. This means that the session created by the calling method may not be shared with the async method. The async method might create its…

  • Designing REST APIs

    Response: Returning errors When the API has to communicate a full error or a partial error back to the client, it is better to have a typed structure rather than a plain string. This allows the clients to render an appropriate UI or design their workflow depending on the type of error. Instead of an…