spring#api
Spring Mvc 기반 api 예외처리
Spring MVC 기반 api 예외처리입니다. api 작성시 컨트롤러로 값이 넘어오기전에 미디어타입이 맞지 않거나 잘못된 형식으로인해 bad 404 에러가 나는 경우가 있습니다. 따라서 web.xml 및 설정파일등을 통해 예외를 잡겠습니다. 환경 : 전자정부프레임워크 3.10 / spring 4.3.25 @Controller public class ExceptionController { @Autowired RequestRrcQrError qrError; RequestRrcQrRetData empty = new RequestRrcQrRetData(); @RequestMapping(value = "/error", method = RequestMethod.POST) @ResponseBody public Re..