[Solved] UNABLE TO START SERVLETWEBSERVERAPPLICATIONCONTEXT DUE TO MISSING SERVLETWEBSERVERFACTORY BEAN

In Spring Boot projects, this error occurs in two ways.

1. you forgot to add @SpringBootApplication in the class where the main method is located

2. the dependency is missing, just add it

<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-web</artifactId>
</dependency>

 

Read More:

Leave a Reply

Your email address will not be published. Required fields are marked *