springboot做桌面弹框运行报错

原因是springboot默认是headless模式,需要启动前手动改成false,

方法:springboot启动类中的

ConfigurableApplicationContext run = SpringApplication.run(Application.class, args);

 改成:


SpringApplicationBuilder builder=new SpringApplicationBuilder(Application.class);
builder.headless(false);
ConfigurableApplicationContext run = builder.run(args);

你可能感兴趣的:(spring,spring,boot,java,spring)