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

@ -1,28 +1,36 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" <project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 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"> xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<artifactId>spring-boot-exceptions</artifactId> <artifactId>spring-boot-exceptions</artifactId>
<packaging>jar</packaging> <packaging>jar</packaging>
<name>spring-boot-exceptions</name> <name>spring-boot-exceptions</name>
<description>Demo project for working with Spring Boot exceptions</description> <description>Demo project for working with Spring Boot exceptions</description>
<parent> <parent>
<groupId>com.baeldung.spring-boot-modules</groupId> <groupId>com.baeldung.spring-boot-modules</groupId>
<artifactId>spring-boot-modules</artifactId> <artifactId>spring-boot-modules</artifactId>
<version>1.0.0-SNAPSHOT</version> <version>1.0.0-SNAPSHOT</version>
<relativePath>../</relativePath> <relativePath>../</relativePath>
</parent> </parent>
<build> <!-- Added in order to produce ApplicationContextException -->
<finalName>spring-boot-exceptions</finalName> <dependencies>
<resources> <dependency>
<resource> <groupId>org.springframework.boot</groupId>
<directory>src/main/resources</directory> <artifactId>spring-boot-starter-web</artifactId>
<filtering>true</filtering> </dependency>
</resource> </dependencies>
</resources>
</build> <build>
<finalName>spring-boot-exceptions</finalName>
<resources>
<resource>
<directory>src/main/resources</directory>
<filtering>true</filtering>
</resource>
</resources>
</build>
</project> </project>

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);
}
}