Cộng đồng Hỏi & Đáp của Inflearn
spring boot 2.3.x 버전 질문있습니다.
Viết
·
297
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);
로 변경하는데 실패했습니다.
다른 방법이 있는걸까요
rest-apijavaspring
Câu trả lời 3
2
whiteship
Người chia sẻ kiến thức
https://github.com/whiteship/study/commit/91d373f84c16b89f69329717b60927a3099cf40d
스프링 부트 2.3으로 업데이트한 커밋입니다. 참고하세요.
1
0





