first commit

This commit is contained in:
Azhwani 2021-05-30 12:41:38 +02:00
parent 8eb252eae6
commit fb529aeee2
3 changed files with 57 additions and 22 deletions

View File

@ -15,6 +15,14 @@
<relativePath>../</relativePath> <relativePath>../</relativePath>
</parent> </parent>
<!-- Added in order to produce ApplicationContextException -->
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
</dependencies>
<build> <build>
<finalName>spring-boot-exceptions</finalName> <finalName>spring-boot-exceptions</finalName>
<resources> <resources>

View File

@ -0,0 +1,13 @@
package com.baeldung.applicationcontextexception;
import org.springframework.boot.WebApplicationType;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
@SpringBootApplication
public class MainClass {
public static void main(String[] args) {
new SpringApplicationBuilder(MainClass.class).web(WebApplicationType.NONE).run(args);
}
}

View File

@ -0,0 +1,14 @@
package com.baeldung.applicationcontextexception;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
//Remove this annotation to produce ApplicationContextException
@SpringBootApplication
public class MainEntryPoint {
public static void main(String[] args) {
SpringApplication.run(MainEntryPoint.class, args);
}
}