How to use @RestControllerAdvice for handling Exception with RestfulApi – New Features of Spring Framework 4.3

We had discussed about @ExceptionHandler, @ResponseStatus, @ControllerAdvice in How to use Spring Exception Handler for SpringMVC: @ExceptionHandler, @ResponseStatus, @ControllerAdvice. In the tutorial, JavaSampleApproach will guide to how to use a new feature of Spring Framework 4.3: @RestControllerAdvice.

[Continue reading…] “How to use @RestControllerAdvice for handling Exception with RestfulApi – New Features of Spring Framework 4.3”

How to use Spring Exception Handler for SpringMVC: @ExceptionHandler, @ResponseStatus, @ControllerAdvice

Spring provides a cross-cutting concern solution for handling Java Excepion. So in the tutorial, JavaSampleApproach will guide how to use Spring Exception with: @ResponseStatus, @ExceptionHandler & @ControllerAdvice.
Related Articles:
How to handle Java Exception
How to use @RestControllerAdvice – New Features of Spring Framework 4.3

[Continue reading…] “How to use Spring Exception Handler for SpringMVC: @ExceptionHandler, @ResponseStatus, @ControllerAdvice”

How to handle Java Exception

We had introduced JavaException in 2 articles: Understand Java Exception & The effect to Java Program (Single & Multi Thread) & How to work with Java Custom Exception. In the tutorial, JavaSampleApproach will guide how to handle Java Exception.
Related post:
How to use Spring Exception Handler for SpringMVC: @ExceptionHandler, @ResponseStatus, @ControllerAdvice

[Continue reading…] “How to handle Java Exception”

Java 7 – try-with-resources Statement

Java 7 provides a new approach for closing resources with clean & clear code by try-with-resources statment. In the article, JavaSampleApproach will introduce the benifit when programming by try-with-resources statement.

Related Post: Understand Java Exception & The effect to Java Program (Single & Multi Thread)

[Continue reading…] “Java 7 – try-with-resources Statement”

Java 8 CompletableFuture Handle Exception

Exception handling is important in software development, Java 8 CompletableFuture also provides methods to handle errors when they occurs.

Related article:
Java Future
Java 8 CompletableFuture
Java 8 Multiple CompletableFutures

[Continue reading…] “Java 8 CompletableFuture Handle Exception”