关于BladeX-master打war包的报错的问题,请务必尽快解决,谢谢!
请注明详细配置文档,非常感谢!
下面是boot版本单个服务打包的教程,参考下。
添加tomcat依赖
2.blade-core-boot排除undertow依赖
3.pom文件修改打包类型为war
4.添加war包插件
5.application.yaml添加修改
#服务器配置
server:
port: 80
spring:
application:
name: blade-api
profiles:
active: dev
main:
allow-bean-definition-overriding: true
6.Application类修改
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;
import org.springframework.scheduling.annotation.EnableScheduling;
/**
* 启动器
*
* @author Chill
*/
@EnableScheduling
@SpringBootApplication
public class Application extends SpringBootServletInitializer {
public static void main(String[] args) {
System.out.printf("----启动中----");
SpringApplication.run(Application.class, args);
}
@Override
protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {
return application.sources(Application.class);
}
}
7.打包
mvn package -Dmaven.test.skip=true
扫一扫访问 Blade技术社区 移动端