whitelabel 에러 페이지 리다이렉트

master
강석 최 2023-04-10 10:03:14 +09:00
parent a3bf6ad82c
commit d1f4b2112a
6 changed files with 37 additions and 0 deletions

View File

@ -0,0 +1,19 @@
package com.dbnt.faisp.config;
import lombok.RequiredArgsConstructor;
import org.springframework.boot.web.servlet.error.ErrorController;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.servlet.ModelAndView;
@RestController
@RequiredArgsConstructor
public class CustomErrorController implements ErrorController {
@GetMapping("/errors")
public ModelAndView errorsToRedirectRoot() {
return new ModelAndView("redirect:/");
}
}

View File

@ -1,4 +1,6 @@
spring.devtools.livereload.enabled=true spring.devtools.livereload.enabled=true
server.error.whitelabel.enabled=false
server.error.path=/errors
tomcat.ajp.protocol=HTTP/1.1 tomcat.ajp.protocol=HTTP/1.1
tomcat.cluster.enabled=false tomcat.cluster.enabled=false

View File

@ -1,3 +1,7 @@
server.error.whitelabel.enabled=false
server.error.path=/errors
#tomcat #tomcat
tomcat.ajp.protocol=HTTP/1.1 tomcat.ajp.protocol=HTTP/1.1
#tomcat.ajp.protocol=AJP/1.3 #tomcat.ajp.protocol=AJP/1.3

View File

@ -1,3 +1,7 @@
server.error.whitelabel.enabled=false
server.error.path=/errors
#tomcat #tomcat
tomcat.ajp.protocol=HTTP/1.1 tomcat.ajp.protocol=HTTP/1.1
#tomcat.ajp.protocol=AJP/1.3 #tomcat.ajp.protocol=AJP/1.3

View File

@ -1,3 +1,7 @@
server.error.whitelabel.enabled=false
server.error.path=/errors
#tomcat #tomcat
tomcat.ajp.protocol=AJP/1.3 tomcat.ajp.protocol=AJP/1.3
tomcat.cluster.enabled=true tomcat.cluster.enabled=true

View File

@ -1,3 +1,7 @@
server.error.whitelabel.enabled=false
server.error.path=/errors
#tomcat #tomcat
tomcat.ajp.protocol=AJP/1.3 tomcat.ajp.protocol=AJP/1.3
tomcat.cluster.enabled=true tomcat.cluster.enabled=true