Skip to content

Commit ab93764

Browse files
authored
Merge pull request #10827 from azhwani/BAEL4608
BAEL-4608: Spring Boot Error "ApplicationContextException: Unable to start ServletWebServerApplicationContext due to missing ServletWebServerFactory bean"
2 parents 836e9b4 + ec06909 commit ab93764

2 files changed

Lines changed: 22 additions & 0 deletions

File tree

spring-boot-modules/spring-boot-exceptions/pom.xml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,14 @@
1515
<relativePath>../</relativePath>
1616
</parent>
1717

18+
<!-- Added in order to produce ApplicationContextException error -->
19+
<dependencies>
20+
<dependency>
21+
<groupId>org.springframework.boot</groupId>
22+
<artifactId>spring-boot-starter-web</artifactId>
23+
</dependency>
24+
</dependencies>
25+
1826
<build>
1927
<finalName>spring-boot-exceptions</finalName>
2028
<resources>
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
package com.baeldung.applicationcontextexception;
2+
3+
import org.springframework.boot.SpringApplication;
4+
import org.springframework.boot.autoconfigure.SpringBootApplication;
5+
6+
//Remove this annotation to produce ApplicationContextException error
7+
@SpringBootApplication
8+
public class MainEntryPoint {
9+
10+
public static void main(String[] args) {
11+
SpringApplication.run(MainEntryPoint.class, args);
12+
}
13+
14+
}

0 commit comments

Comments
 (0)