springboot java.awt.AWTException: headless environment

修改启动类即可 

 

@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
posted @ 2019-08-09 11:24  冬天不眠  阅读(3978)  评论(0编辑  收藏  举报