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
If you run it successfully using command line gradle bootRun, while packaging it with command line gradle jar to jar file in order to run it with command line java -jar build/libs/demo.jar, unfortunately, it failed with Exception: Unable to start EmbeddedWebApplicationContext due to missing EmbeddedServletContainerFactory bean, in this case, you need to use task bootRepackage of gradle plugin spring-boot to generate special runnable jar.
$ gradle clean bootRepackage
$ java -jar build/libs/demo.jar