• zbb20181217 通过Tomcat配置、启动Springboot项目war包程序


    1、pom增加

    <dependency>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-starter-tomcat</artifactId>
                <scope>provided</scope>
            </dependency>
     
    <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-compiler-plugin</artifactId>
                    <configuration>
                        <source>1.8</source>
                        <target>1.8</target>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.springframework.boot</groupId>
                    <artifactId>spring-boot-maven-plugin</artifactId>
                    <configuration>
                        <maimClass>com.zbb.app.Application</maimClass>
                    </configuration>
                    <executions>
                        <execution>
                            <goals>
                                <goal>repackage</goal>
                            </goals>
                        </execution>
                    </executions>
    
                </plugin>

      2、Application.java

    /**
     * springboot_aop
     */
    @SpringBootApplication
    @EnableScheduling
    public class Application extends SpringBootServletInitializer {
    
        @Override
        protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {
            return application.sources(Application.class);
        }
    
        public static void main(String[] args) throws Exception {
            SpringApplication.run(Application.class, args);
        }
    }

    3、使用Tomcat > 8.5

  • 相关阅读:
    日志收集
    解决spawn-fcgi child exited with: 1
    confluence启动关闭
    Informatica 启动、停止工作流命令
    启动obiee
    oracle修改连接空闲自动断开
    ORA-00845: MEMORY_TARGET not supported on this system
    svn执行clean up命令时报错
    手游推广
    phonegap/cordova 升级版本
  • 原文地址:https://www.cnblogs.com/super-admin/p/10132122.html
Copyright © 2020-2023  润新知