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've had similar problems when the main method is on a different class than that passed to SpringApplcation.run()
So the solution would be to use the line you've commented out:
public class Application { public static void main(String[] args) { SpringApplication.run(Application.class, args); } }