Learn Spring Boot

News

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

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

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

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

The Spring Boot Optional Path Variable is used to handle the request urls that do not have path variable value. Optional Path variables in spring boot can be configured using the annotation @PathVariable. if the path variable is not configured as optional and the value of the path variable is

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 spring boot logging level allow the application to log in different log levels. The spring boot log level is set to INFO by default. The information and above level logs will be shown in the console window or in a log file. The logging level can be modified at

How to call one rest api from another rest api

In spring boot microservices architecture, all services are configured as rest services. There is a need for one rest service to be called by another rest service. A rest api service may depend on a number of other services. All spring boot downstream services need to be accessed from the