--SpringApplication # setWebEnvironment () est obsolète
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);
//Quelque chose de traitement
}
}
Recommended Posts