修改启动类即可 

 

@SpringBootApplication
public class SystemctlApplication {

public static void main(String[] args) {
SpringApplicationBuilder builder = new SpringApplicationBuilder(SystemctlApplication.class);
//SpringApplication.run(SystemctlApplication.class, args);
builder.headless(false)
// .web(WebApplicationType.NONE)
// .bannerMode(Banner.Mode.OFF)
.run(args);
}

}

参考
https://stackoverflow.com/questions/51004447/spring-boot-java-awt-headlessexception

转载于:https://www.cnblogs.com/syscn/p/11326103.html

Logo

腾讯云面向开发者汇聚海量精品云计算使用和开发经验,营造开放的云计算技术生态圈。

更多推荐