moved new package to existing one
This commit is contained in:
parent
684ee6040e
commit
8a307c1aba
|
@ -1,15 +0,0 @@
|
||||||
package com.baeldung.errorhandling.boot;
|
|
||||||
|
|
||||||
import org.springframework.boot.SpringApplication;
|
|
||||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
|
||||||
import org.springframework.context.annotation.PropertySource;
|
|
||||||
|
|
||||||
@SpringBootApplication
|
|
||||||
@PropertySource("errorhandling-application.properties")
|
|
||||||
public class ErrorHandlingBootApplication {
|
|
||||||
|
|
||||||
public static void main(String[] args) {
|
|
||||||
SpringApplication.run(ErrorHandlingBootApplication.class, args);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
|
@ -1,4 +1,4 @@
|
||||||
package com.baeldung.errorhandling.boot.configurations;
|
package com.baeldung.web.config;
|
||||||
|
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package com.baeldung.errorhandling.boot.configurations;
|
package com.baeldung.web.config;
|
||||||
|
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package com.baeldung.errorhandling.boot.web;
|
package com.baeldung.web.controller;
|
||||||
|
|
||||||
import org.springframework.http.ResponseEntity;
|
import org.springframework.http.ResponseEntity;
|
||||||
import org.springframework.web.bind.annotation.GetMapping;
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
@ -9,7 +9,7 @@ public class FaultyRestController {
|
||||||
|
|
||||||
@GetMapping("/exception")
|
@GetMapping("/exception")
|
||||||
public ResponseEntity<Void> requestWithException() {
|
public ResponseEntity<Void> requestWithException() {
|
||||||
throw new NullPointerException("Error in the faulty controller!");
|
throw new RuntimeException("Error in the faulty controller!");
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
|
@ -0,0 +1,3 @@
|
||||||
|
### Spring Boot default error handling configurations
|
||||||
|
#server.error.whitelabel.enabled=false
|
||||||
|
#server.error.include-stacktrace=always
|
|
@ -1,3 +0,0 @@
|
||||||
|
|
||||||
#server.error.whitelabel.enabled=false
|
|
||||||
#server.error.include-stacktrace=always
|
|
|
@ -1,4 +1,4 @@
|
||||||
package com.baeldung.errorhandling.boot;
|
package com.baeldung.web.error;
|
||||||
|
|
||||||
import static io.restassured.RestAssured.given;
|
import static io.restassured.RestAssured.given;
|
||||||
import static org.assertj.core.api.Assertions.assertThat;
|
import static org.assertj.core.api.Assertions.assertThat;
|
Loading…
Reference in New Issue