스프링 부트로 API를 생성하므로 /error
매핑을 비활성화하십시오.스프링 부트 비활성화/오류 매핑
내가 application.properties에 다음과 같은 소품을 설정 한 :
server.error.whitelabel.enabled=false
spring.mvc.throw-exception-if-no-handler-found=true
spring.resources.add-mappings=false
을 그러나 내가 /error
를 쳤을 때 내가 얻을 :
HTTP/1.1 500 Internal Server Error
Server: Apache-Coyote/1.1
Content-Type: application/json;charset=UTF-8
Transfer-Encoding: chunked
Date: Wed, 03 Aug 2016 15:15:31 GMT
Connection: close
{"timestamp":1470237331487,"status":999,"error":"None","message":"No message available"}
필수 결과
HTTP/1.1 404 Internal Server Error
Server: Apache-Coyote/1.1
그래,이게 정확히 성가시다. 궁금해 할 일이없는 바인딩을 제거하는 방법이 있다면 – ptimson
같은 오류, 내가 모든 오류를 이제는 json 대신 html로 ... – TheBakker