Software Workshop

Unable to start web server; nested exception is org.springframework.context.ApplicationContextException: Unable to start ServletWebServerApplicationContext due to missing ServletWebServerFactory bean.

Unable to start ReactiveWebApplicationContext due to missing ReactiveWebServerFactory bean

이 에러는 Spring Boot Application의 context가 시작되지 않았다는 것을 의미하며 웹서비스가 생성되지 않은 것이 근본 원인이다.

Application 클래스가 따로 정의되어 있지 않거나, 서비스 포트를 바인드하지 못했거나 하는 등의 이유로 웹서비스가 생성되지 않았기 때문이므로 Application 클래스가 제대로 작성되어 있고 설정되어 있는지 확인할 필요가 있다.

Application.java

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

run() 메소드의 첫번째 파라미터가 클래스명과 일치하지 않아도 동일한 오류가 발생할 수 있음