I am totally new to Spring and started to do the official guides from this site: https://spring.io/guides
I\'d like to do this guide: https://spring.io/guides/gs/sch
I had multiple application classes in one Spring Boot project which had the web started included and wanted to avoid it configuring a web environment for one of them so I manually configured it as below:
@SpringBootApplication
public class Application
{
public static void main(String[] args)
{
new SpringApplicationBuilder(Application.class)
.web(false)
.run(args);
}
}
UPDATE for Spring Boot 2 and above:
@SpringBootApplication
public class Application
{
public static void main(String[] args)
{
new SpringApplicationBuilder(Application.class)
.web(WebApplicationType.NONE)
.run(args);
}
}