강의

멘토링

커뮤니티

인프런 커뮤니티 질문&답변

OMG님의 프로필 이미지
OMG

작성한 질문수

스프링 데이터 JPA

스프링부트 2.2 이상에서 Resource, PagedResource 관련 변경 사항

해결된 질문

작성

·

370

2

출처:

https://stackoverflow.com/questions/25352764/hateoas-methods-not-found

83

In case you are using HATEOAS v1.0 and above (Spring boot >= 2.2.0), do note that the classnames have changed. Notably the below classes have been renamed:

  • ResourceSupport changed to RepresentationModel
  • Resource changed to EntityModel
  • Resources changed to CollectionModel
  • PagedResources changed to PagedModel
  • ResourceAssembler changed to RepresentationModelAssembler

More information available in the official documentation here.

When using Spring boot starter, the below dependency would suffice to include HATEOAS:

<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-hateoas</artifactId>
</dependency>

Hoping this information will help someone like me who searched for hours to find why Resource class was not getting resolved.

스프링부트 버전 2.2 이상 이신분들은 참고하시면 될거 같아요~

답변 2

0

백기선님의 프로필 이미지
백기선
지식공유자

정리 해주셔서 감사합니다.

OMG님의 프로필 이미지
OMG

작성한 질문수

질문하기