1、修改配置 xxl-job.pom.xml
<failOnMissingWebXml>false</failOnMissingWebXml>
2、修改xxl-job-admin.pom.xml
<packaging>war</packaging>
<plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-war-plugin</artifactId> <version>3.2.3</version> </plugin>
3、修改启动类 XxlJobAdminApplication
package com.xxl.job.admin; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.boot.builder.SpringApplicationBuilder; import org.springframework.boot.web.servlet.support.SpringBootServletInitializer; @SpringBootApplication public class XxlJobAdminApplication extends SpringBootServletInitializer { @Override protected SpringApplicationBuilder configure(SpringApplicationBuilder builder) { return builder.sources(XxlJobAdminApplication.class); } public static void main(String[] args) { SpringApplication.run(XxlJobAdminApplication.class, args); } }
4、打包 mvn install
得到我们需要的war包
原文地址:https://blog.csdn.net/weixin_43887517/article/details/124842943
标签:boot,XxlJobAdminApplication,springframework,JOB,import,org,war,XXL From: https://www.cnblogs.com/record-100/p/17546187.html