Spring REST Error Handling Example
In this article, we will show you error handling in Spring Boot REST application. Technologies used :Spring Boot 2.1.2.RELEASE, Spring 5.1.4.RELEASE, Maven 3, Java 8
Favourite tutorials for developers
In this article, we will show you error handling in Spring Boot REST application. Technologies used :Spring Boot 2.1.2.RELEASE, Spring 5.1.4.RELEASE, Maven 3, Java 8
In this article, we will enhance the previous Spring REST Hello World example, by adding bean validation and custom validator. Technologies used : Spring Boot 2.1.2.RELEASE, Spring 5.1.4.RELEASE, Maven 3,…
In this tutorial, we will show you how to use Logback in Spring Boot framework. Technologies used : Spring Boot 2.1.2.RELEASE, Spring 5.1.4.RELEASE, Logback 1.2.3, Maven 3, Java 8
Add the following lines in application.properties to log the Hibernate SQL query. To show sql statement: logging.level.org.hibernate.SQL=debug . To show sql values: logging.level.org.hibernate.type.descriptor.sql=trace
Run the Spring Boot integration test or unit test, many annoying DEBUG and INFO logs are displayed in the console. To disable the logs, turn off the logging.level in both…
Review a simple Java application and log a message via Logback. Run above program, the Logback will logs a message twice? This is caused by the Appenders accumulate. To fix…
The logback will output its own status (INFO or WARN) at the start of the program, it’s really annoying! To fix it, add a NopStatusListener in logback.xml
While the unit test is running in the IDE, the Logback is showing a lot of configuration or status like this. It is really annoying, especially for the failed test,…
Here’s an XML version of log4j properties file, just for sharing. Redirect the logging to console. Redirect the logging to a file. Full example to output the logging to both…
I can’t find many log4j.properties examples, here are a few log4j.properties examples that are used in my project, just for sharing. All logging will be redirected to your console. All…