--SpringApplication # setWebEnvironment () is deprecated
public class Main {
public static void main(String[] args) {
SpringApplication app = new SpringApplication(Main.class);
app.setWebApplicationType(WebApplicationType.NONE);
ApplicationContext ctx = app.run(args);
Main main = ctx.getBean(Main.class);
//Something processing
}
}
Recommended Posts