Spring Boot: Unable to start EmbeddedWebApplicationContext due to missing EmbeddedServletContainerFactory bean

前端 未结 27 1438
一整个雨季
一整个雨季 2020-11-28 03:55

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

27条回答
  •  野性不改
    2020-11-28 04:50

    Adding the annotation @SpringBootApplication Before the starter class fixed this problem for me (so in essence, this error message can mean "you don't have a @SpringBootApplication marked class anywhere, you need at least one)

    @SpringBootApplication
    public class AppStarter {
    
        public static void main(String[] args) {
            SpringApplication.run(AppStarter.class, args);
        }
    }
    

提交回复
热议问题