diff --git a/spring-boot-modules/spring-boot-exceptions/pom.xml b/spring-boot-modules/spring-boot-exceptions/pom.xml index c0c335f55c..381042cdaa 100644 --- a/spring-boot-modules/spring-boot-exceptions/pom.xml +++ b/spring-boot-modules/spring-boot-exceptions/pom.xml @@ -1,28 +1,36 @@ - 4.0.0 - spring-boot-exceptions - jar - spring-boot-exceptions - Demo project for working with Spring Boot exceptions + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + 4.0.0 + spring-boot-exceptions + jar + spring-boot-exceptions + Demo project for working with Spring Boot exceptions - - com.baeldung.spring-boot-modules - spring-boot-modules - 1.0.0-SNAPSHOT - ../ - + + com.baeldung.spring-boot-modules + spring-boot-modules + 1.0.0-SNAPSHOT + ../ + - - spring-boot-exceptions - - - src/main/resources - true - - - + + + + org.springframework.boot + spring-boot-starter-web + + + + + spring-boot-exceptions + + + src/main/resources + true + + + \ No newline at end of file diff --git a/spring-boot-modules/spring-boot-exceptions/src/test/java/com/baeldung/applicationcontextexception/MainClass.java b/spring-boot-modules/spring-boot-exceptions/src/test/java/com/baeldung/applicationcontextexception/MainClass.java new file mode 100644 index 0000000000..284795c280 --- /dev/null +++ b/spring-boot-modules/spring-boot-exceptions/src/test/java/com/baeldung/applicationcontextexception/MainClass.java @@ -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); + } +} \ No newline at end of file diff --git a/spring-boot-modules/spring-boot-exceptions/src/test/java/com/baeldung/applicationcontextexception/MainEntryPoint.java b/spring-boot-modules/spring-boot-exceptions/src/test/java/com/baeldung/applicationcontextexception/MainEntryPoint.java new file mode 100644 index 0000000000..4cb40b3c4d --- /dev/null +++ b/spring-boot-modules/spring-boot-exceptions/src/test/java/com/baeldung/applicationcontextexception/MainEntryPoint.java @@ -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); + } + +}