How to perform Exception Handling in Spring MVC / How to use @ExceptionHandler and @ControllerAdvice for exception handling in Spring

Exception handling is an integral part of any application. It involves catching errors and showing a graceful error message to the end user. Normally, try-catch blocks are used in a java application to handle exceptions where the error raised can be shown on a console or UI. But, in a web application, (more…)

Continue Reading

How to Autowire objects in Non-Spring classes / How to get Application context in Non-Spring classes / How to get access to the Spring application context In a non-Spring class

Scenario

Imagine you are working on a Spring application where most of the objects are created using Spring annotations and fields are also injected using Spring mechanisms (using @Autowired or XML configuration). Now you develop a component or use an API which is written without any use of Spring and you need one of your Spring managed classes in it. (more…)

Continue Reading

How to configure Hibernate / Various ways to configure Hibernate in an application

Hibernate framework is used for interacting with database records as Java Objects and vice-versa. It saves/updates java objects as database records, fetches database records as java objects etc. Hibernate performs database interaction using its Session objects. Session objects are retrieved with the help of a SessionFactory. This SessionFactory is related to a particular database.

(more…)

Continue Reading
Close Menu

Never Miss an article !

Get the new post delivered straight into your inbox, enter your email and hit the button

You have successfully subscribed to the newsletter

There was an error while trying to send your request. Please try again.

codippa will use the information you provide on this form to be in touch with you and to provide updates and marketing.