Learn Spring Boot


@Async not working Spring Boot – Troubleshoot

The spring boot @Async annotation is used to execute a method asynchronously. This means that the @Async annotation helps to invoke a method and forget about it. The call method will not wait for the completion or response of the asynchronous method. This improves the efficiency of the application by

SimpleAsyncUncaughtExceptionHandler : Unexpected exception occurred invoking async method:

Spring boot Exception SimpleAsyncUncaughtExceptionHandler : Unexpected exception occurred invoking async method: is thrown if an exception is thrown from the @Async annotation method. This error is due to either to a coding problem or to a logical issue. If the error has been corrected, this exception SimpleAsyncUncaughtExceptionHandler : Unexpected exception

@Async Exception handling Spring Boot

The spring boot @Async annotation enables the class method to run asynchronous. The handling of the exception in the @Async annotation method is therefore complex. Spring boot supports the default Async Uncaught Exception handler that throws the actual exception in the console log. Spring boot allows the Async Uncaught Exception

RejectedExecutionException: Task java.util.concurrent.FutureTask rejected from java.util.concurrent.ThreadPoolExecutor

The spring boot exception java.util.concurrent.RejectedExecutionException: Task java.util.concurrent.FutureTask rejected from java.util.concurrent.ThreadPoolExecutor happens when the thread pool queue is complete and no further threads can be created. If the ThreadPoolTaskExecutor could not create a thread or could not add it to the queue, the request will be dropped and the exception Task

Spring Boot @PathVariable Annotation

The annotation @PathVariable in the spring boot is used to bind the template variable in the request url to the method parameter variable in the rest controller. The spring boot @PathVariable annotation finds the template value in the request url using the template and attaches the value to the method

Spring Boot Optional Path Variables

In this post, we’ll see how to make the @PathVariable optional for the spring boot application. The path variable value is needed in the url request if the path variable is configured in the method parameters. If the value of the path variable is not available, the exception would be

How to Configure Port for a Spring Boot Application

The spring boot application is configured with the default tomcat server. The spring boot configures the tomcat server to run on default port 8080. Spring boot provides an option to change the default port in a number of ways. In this post, we will see the different ways of changing

How to set Logging Level with application.properties in Spring Boot

The logging level of the spring boot application is set using the logging configuration in the application.properties file. The spring boot logging framework enables a configuration that lets you change the logging level of the application. The spring boot logging level allow the application to log in different log levels.