-
카테고리
-
세부 분야
백엔드
-
해결 여부
미해결
spring boot 2.3.x 버전 질문있습니다.
20.11.06 13:08 작성 조회수 162
1
2.2.5버전 에서 hateos 메서드 변경적용후
2.3.x으로 버전업을 해보니 EntityModel 에서 변동사항이 있었습니다
생성자가 Deprecated되고 static메서드인 of메서드가 추가되었는데
기존 생성과 수정 api에서 사용하던 badRequest 응답시에 500에러가 발생합니다
ResponseEntity<ErrorsResource> body = ResponseEntity.badRequest().body(new ErrorsResource(errors));
->
ErrorsResource errorsResource = ErrorsResource.of(errors);
errosResource.add(linkTo(methodOn(IndexController.class).index()).withRel("index"));
ResponseEntity<ErrorsResource> body = ResponseEntity.badRequest().body(errosResource);
로 변경하는데 실패했습니다.
다른 방법이 있는걸까요
답변을 작성해보세요.
답변 3