@Controller
@ConditionalOnWebApplication
@RequestMapping(value="${server.error.path:${error.path:/error}}")
public class CustomErrorController
extends org.springframework.boot.autoconfigure.web.AbstractErrorController
| 构造器和说明 |
|---|
CustomErrorController(org.springframework.boot.autoconfigure.web.ErrorAttributes errorAttributes) |
| 限定符和类型 | 方法和说明 |
|---|---|
org.springframework.http.ResponseEntity<java.lang.Object> |
error(javax.servlet.http.HttpServletRequest request) |
org.springframework.http.ResponseEntity<java.lang.Object> |
errorPlain(javax.servlet.http.HttpServletRequest request) |
java.lang.String |
getErrorPath() |
protected org.springframework.boot.autoconfigure.web.ErrorProperties |
getErrorProperties() |
protected boolean |
isIncludeStackTrace(javax.servlet.http.HttpServletRequest request,
org.springframework.http.MediaType... produces) |
@Autowired public CustomErrorController(org.springframework.boot.autoconfigure.web.ErrorAttributes errorAttributes)
public java.lang.String getErrorPath()
protected org.springframework.boot.autoconfigure.web.ErrorProperties getErrorProperties()
protected boolean isIncludeStackTrace(javax.servlet.http.HttpServletRequest request,
org.springframework.http.MediaType... produces)
@RequestMapping(produces={"text/plain","text/html"})
@ResponseBody
public org.springframework.http.ResponseEntity<java.lang.Object> errorPlain(javax.servlet.http.HttpServletRequest request)
throws com.fasterxml.jackson.core.JsonProcessingException
com.fasterxml.jackson.core.JsonProcessingException@RequestMapping
@ResponseBody
public org.springframework.http.ResponseEntity<java.lang.Object> error(javax.servlet.http.HttpServletRequest request)
throws com.fasterxml.jackson.core.JsonProcessingException
com.fasterxml.jackson.core.JsonProcessingException