<!-- <!--

Tomcat改jar

<!--            <plugin>-->
<!--                <groupId>org.apache.maven.plugins</groupId>-->
<!--                <artifactId>maven-war-plugin</artifactId>-->
<!--                <version>3.1.0</version>-->
<!--                <configuration>-->
<!--                    <resourceEncoding>UTF-8</resourceEncoding>-->
<!--                </configuration>-->
<!--            </plugin>-->

            <plugin>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
                <configuration>
                    <mainClass>HuishanProviderApplication</mainClass>
                </configuration>
            </plugin>
package com;

import com.fedtech.commons.util.SpringContextUtils;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.web.support.SpringBootServletInitializer;
import org.springframework.context.annotation.Bean;
import org.springframework.scheduling.annotation.EnableScheduling;

@SpringBootApplication(exclude = {DataSourceAutoConfiguration.class})
@EnableScheduling
public class HuishanProviderApplication extends SpringBootServletInitializer {

    public static void main(String[] args) {
        System.setProperty("spring.devtools.restart.enabled", "false");
        SpringApplication.run(HuishanProviderApplication.class, args);
    }

    @Bean
    public SpringContextUtils springContextUtils(){
        return new SpringContextUtils();
    }

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

}
 
<artifactId>huishan-provider</artifactId>
<!--    <packaging>war</packaging>-->
<packaging>jar</packaging>
<dependencies>
作者:|qq_小欢_1|,原文链接: http://www.imooc.com/article/325407

文章推荐

linux-ext4格式文件误删除,该如何恢复?

【可视化分析案例】用python分析B站Top100排行榜数据

Python趣味入门9:函数是你走过的套路,详解函数、调用、参...

Spring Cloud OpenFeign 的 5 个优化小技巧!

SpringBoot 整合 RabbitMQ 实现消息可靠传输

有趣的BUG之Stack Overflow

Python技法:用argparse模块解析命令行选项

「Java分享客栈」随时用随时翻:微服务链路追踪之zipkin搭建

《跟老卫学 HarmonyOS 开发》:DevEco Studio 启

MySQL 的prepare使用中的bug解析过程

并发编程之临界区\阻塞\非阻塞\死锁\饥饿\活锁

myql相关