跳至主要內容

FastChar-Server-Tomcat

小于 1 分钟

FastChar-Server-Tomcat

介绍

FastChar官方提供的内嵌式服务器Tomcat。

使用

引入工具包

开发者需要集成FastChar-Server-Tomcat Maven CentralGithub 的工具包。以maven项目为例,在pom.xml中加入如下引用:

<dependency>
    <groupId>com.fastchar</groupId>
    <artifactId>fastchar-server-tomcat</artifactId>
    <version>1.2.0</version>
</dependency>

使用插件

开发者可以直接在main方法中运行tomcat启动项目,如下:

public class FastServer {
    public static void main(String[] args) {
        FastServerTomcat.getInstance().start(new FastTomcatConfig()
                .setPort(8888)
                .setDisplayName("test_project")
                .setContextPath("/test_project"));
    }
}