idea 将 sprintboot 打包war 部署 tomca

2021-09-15  本文已影响0人  抬头丶看天空

1、server.xml 端口修改

<Connector port="8099" protocol="HTTP/1.1" connectionTimeout="20000" redirectPort="8443" />

外部tomcat 启动 配置 启动类 SpringBootStartApplication.java

package top.goods;

import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;

/**
 * @Package: top.goods
 * @ClassName: SpringBootStartApplication
 * @Author: cyy
 * @CreateDate: 2021/5/7 18:33
 * @Version: 1.0
 */
public class SpringBootStartApplication  extends SpringBootServletInitializer {
    @Override
    protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {
        return application.sources(Application.class);
    }
}
上一篇 下一篇

猜你喜欢

热点阅读