SpringBoot打包启动

1.jar包启动

  1. 启动获取更多信息
    java -jar xxx.jar --debug
  2. 启动指定堆内存最大最小值
    java -jar -Xms2048m -Xmx2048m xxx.jar

2.war包启动

  1. 在pom.xml

war


  
  springboot-demo

  1. 启动类修改
public class SpringbootDemoApplication extends SpringBootServletInitializer {

    @Override
    protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {
        return application.sources(SpringbootDemoApplication.class);
    }

    public static void main(String[] args) throws Exception {
        SpringApplication.run(SpringbootDemoApplication.class, args);
    }

}

你可能感兴趣的:(SpringBoot打包启动)