This article presents different ways to include an external JAR when starting a Spring Boot application from the Command Line.
This short article shows how to set up and use Java 18 in your Spring Boot applications.
Spring-Boot supports HikariCP (default), tomcat-jdbc and Commons DBCP as Connection Pool for your Database. Each pool, however, uses a different set of properties. In this tutorial we will learn how to configure the Tomcat Connection Pool.
You can configure an Access Control List for IP Addresses in Spring Boot through the IPAddressAccessControlHandler. Let’ see how to do it.
You can configure Undertow Pool size in Spring Boot applications through UndertowServletWebServerFactory. Let’s learn how to do it.
You can configure HTTP Session Timeout for Spring Boot Applications in two ways:
Configuring Session Timeout in application.properties
The simplest option is to include in your application.properties the parameter server.servlet.session.timeout. For example:
Also note that Tomcat will not allow you to set the timeout any less than 60 seconds.
Configuring Session Timeout Programmatically
Let’s say we want that our HttpSession last only two minutes. To make this happen, we can add to our WebConfiguration class an EmbeddedServletContainerCustomizer Bean with the following content:
Spring Boot automatically starts an application in web server mode if it finds the web starter module in the classpath. To disable web server configuration, set the webApplicationType to none in the application.properties file as in this example: spring.main.web-application-type=none Copy
In this tutorial you will learn how to configure the default Web Server embedded in Spring Boot
Out of the box, Spring boot applications use the embedded tomcat server start at default port
8080. You can change the default embedded server port to any other port, using any one of following options.
By default, Spring boot uses Tomcat as embedded Web server. There are, however, other available Web servers in case you need some specific features. In this tutorial we will learn how to use Jetty as Web Server. Add spring-boot-starter-jetty dependency You will need to update pom.xml and add dependency for spring-boot-starter-jetty. Also, you will need … Read more