Overview
Smart-Servlet is a lightweight servlet container based on Jakarta Servlet 6.1 for Java 17 + environments.
Open-source Repositories:
Feature Guidance
This is a solution provided for the WAR package deployment method.
Directorysmart-servlet-bin-${version} main directory
Directorybin
- start.sh Linux environment startup script
- start.bat Windows environment startup script
Directoryconf
- License.shield enterprise authorization certificate
- smart-servlet.properties service configuration file
- smart-servlet.pem SSL certificate
Directorylib/ smart-servlet dependency packages
- …
Directorywebapps directory for deploying WAR packages
- .war
- README.md
Those who have used Spring Boot’s spring-boot-starter-tomcat or spring-boot-starter-undertow should be familiar with this.
smart-servlet-spring-boot-starter is essentially another adaptation of smart-servlet for spring-boot-starter-web.
Simply adjust the pom.xml configuration in your Spring Boot project as follows to replace Spring Boot’s default Servlet container with smart-servlet.
This is a usage similar to tomcat-maven-plugin
, typically applied in the local development environment of Java Web projects.
Integrating this plugin requires adding the following code to the pom.xml to start the servlet service in the IDE.
The plugin version is recommended to be the latest. The main configuration items include:
- port: the listening port for the servlet service to start
- path: the context path of the Servlet container, usually indicated by
/
. Of course, it also supports customization, but it must start with/
.
After completing the configuration, input mvn package smart-servlet:run
in the console.