Skip to content

Commit f97e1f3

Browse files
authored
Merge pull request eugenp#6823 from eugenp/BAEL-2892-v2
refactor module spring-boot-ex
2 parents b5d9543 + adb8759 commit f97e1f3

15 files changed

Lines changed: 81 additions & 81 deletions

File tree

‎pom.xml‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -628,6 +628,7 @@
628628
<module>spring-boot-custom-starter</module>
629629
<module>spring-boot-disable-console-logging</module>
630630
<!-- <module>spring-boot-gradle</module> --> <!-- Not a maven project -->
631+
<module>spring-boot-exceptions</module>
631632
<module>spring-boot-jasypt</module>
632633
<module>spring-boot-keycloak</module>
633634
<module>spring-boot-logging-log4j2</module>
@@ -825,7 +826,8 @@
825826
<module>spring-boot-client</module>
826827
<module>spring-boot-configuration</module>
827828
<module>spring-boot-custom-starter</module>
828-
<module>greeter-spring-boot-autoconfigure</module>
829+
<module>spring-boot-exceptions</module>
830+
<module>greeter-spring-boot-autoconfigure</module>
829831
<module>greeter-spring-boot-sample-app</module>
830832
<module>persistence-modules/spring-boot-h2/spring-boot-h2-database</module>
831833
<module>spring-boot-jasypt</module>
@@ -1286,6 +1288,7 @@
12861288
<module>spring-boot-ctx-fluent</module>
12871289
<module>spring-boot-custom-starter</module>
12881290
<module>spring-boot-disable-console-logging</module>
1291+
<module>spring-boot-exceptions</module>
12891292
<!-- <module>spring-boot-gradle</module> --> <!-- Not a maven project -->
12901293
<module>spring-boot-jasypt</module>
12911294
<module>spring-boot-keycloak</module>

spring-boot-exceptions/pass-exception-to-client-json-spring-boot/.gitignore renamed to spring-boot-exceptions/.gitignore

File renamed without changes.

‎spring-boot-exceptions/pass-exception-to-client-json-spring-boot/pom.xml‎

Lines changed: 0 additions & 43 deletions
This file was deleted.

‎spring-boot-exceptions/pass-exception-to-client-json-spring-boot/src/main/java/com/baeldung/passexceptiontoclientjsonspringboot/PassExceptionToClientJsonSpringBootApplication.java‎

Lines changed: 0 additions & 13 deletions
This file was deleted.

‎spring-boot-exceptions/pass-exception-to-client-json-spring-boot/src/test/java/com/baeldung/passexceptiontoclientjsonspringboot/MainControllerIntegrationTest.java‎

Lines changed: 0 additions & 16 deletions
This file was deleted.

‎spring-boot-exceptions/pom.xml‎

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<project xmlns="http://maven.apache.org/POM/4.0.0"
3+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
5+
<modelVersion>4.0.0</modelVersion>
6+
7+
<parent>
8+
<groupId>com.baeldung</groupId>
9+
<artifactId>parent-boot-2</artifactId>
10+
<version>0.0.1-SNAPSHOT</version>
11+
<relativePath>../parent-boot-2</relativePath>
12+
</parent>
13+
14+
<groupId>com.baeldung</groupId>
15+
<artifactId>spring-boot-exceptions</artifactId>
16+
<version>0.0.4-SNAPSHOT</version>
17+
<name>pass-exception-to-client-json-spring-boot</name>
18+
<description>Baeldung article code on how to pass exceptions to client in JSON format using Spring Boot</description>
19+
20+
<properties>
21+
<java.version>1.8</java.version>
22+
</properties>
23+
24+
<dependencies>
25+
<dependency>
26+
<groupId>org.springframework.boot</groupId>
27+
<artifactId>spring-boot-starter-web</artifactId>
28+
</dependency>
29+
30+
<dependency>
31+
<groupId>org.springframework.boot</groupId>
32+
<artifactId>spring-boot-starter-test</artifactId>
33+
<scope>test</scope>
34+
</dependency>
35+
</dependencies>
36+
37+
</project>

spring-boot-exceptions/pass-exception-to-client-json-spring-boot/src/main/java/com/baeldung/passexceptiontoclientjsonspringboot/CustomException.java renamed to spring-boot-exceptions/src/main/java/com/baeldung/jsonexception/CustomException.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package com.baeldung.passexceptiontoclientjsonspringboot;
1+
package com.baeldung.jsonexception;
22

33
public class CustomException extends RuntimeException {
44

spring-boot-exceptions/pass-exception-to-client-json-spring-boot/src/main/java/com/baeldung/passexceptiontoclientjsonspringboot/ErrorHandler.java renamed to spring-boot-exceptions/src/main/java/com/baeldung/jsonexception/ErrorHandler.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package com.baeldung.passexceptiontoclientjsonspringboot;
1+
package com.baeldung.jsonexception;
22

33
import org.springframework.http.HttpStatus;
44
import org.springframework.web.bind.annotation.ControllerAdvice;
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
package com.baeldung.jsonexception;
2+
3+
import org.springframework.boot.SpringApplication;
4+
import org.springframework.boot.autoconfigure.SpringBootApplication;
5+
6+
@SpringBootApplication
7+
public class JsonErrorApplication {
8+
9+
public static void main(String[] args) {
10+
SpringApplication.run(JsonErrorApplication.class, args);
11+
}
12+
13+
}

spring-boot-exceptions/pass-exception-to-client-json-spring-boot/src/main/java/com/baeldung/passexceptiontoclientjsonspringboot/MainController.java renamed to spring-boot-exceptions/src/main/java/com/baeldung/jsonexception/MainController.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package com.baeldung.passexceptiontoclientjsonspringboot;
1+
package com.baeldung.jsonexception;
22

33
import org.springframework.stereotype.Controller;
44
import org.springframework.web.bind.annotation.GetMapping;

0 commit comments

Comments
 (0)