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