Tag Archives: Spring boot Run Error

[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>