• 카테고리

    질문 & 답변
  • 세부 분야

    백엔드

  • 해결 여부

    미해결

폼 추가 부터 안되네요...ㅠㅠ

20.12.30 15:21 작성 조회수 530

0

1. 우선, 스터디 환경은 다음과 같습니다.

<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.4.0</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>

2. 일단 강의 처럼 디펜던시 아래와 같이 추가 하면,

<dependency>
<groupId>org.springframework.data</groupId>
<artifactId>spring-data-rest-hal-browser</artifactId>
</dependency>

3. 아래와 같이 콘솔 오류 나옵니다.

Cannot resolve org.springframework.data:spring-data-rest-hal-browser:unknown

4. 그래서 구글링 좀 해봐서 아래 처럼 버전을 넣어 봤더니 폼 등록 및 메이븐 리빌드 까진 성공했으나, 

<!-- https://mvnrepository.com/artifact/org.springframework.data/spring-data-rest-hal-browser -->
<dependency>
<groupId>org.springframework.data</groupId>
<artifactId>spring-data-rest-hal-browser</artifactId>
<version>3.3.6.RELEASE</version>
</dependency>

5. 서버 기동 시 실패 했습니다.

2020-12-30 15:20:40.186 ERROR 938 --- [  restartedMain] o.s.b.d.LoggingFailureAnalysisReporter   : 

***************************

APPLICATION FAILED TO START

***************************

Description:

An attempt was made to call a method that does not exist. The attempt was made from the following location:

    org.springframework.data.rest.core.support.UnwrappingRepositoryInvokerFactory.<init>(UnwrappingRepositoryInvokerFactory.java:54)

The following method did not exist:

    'org.springframework.plugin.core.PluginRegistry org.springframework.plugin.core.PluginRegistry.of(java.util.List)'

The method's class, org.springframework.plugin.core.PluginRegistry, is available from the following locations:

    jar:file:/Users/imdongbin/.m2/repository/org/springframework/plugin/spring-plugin-core/1.2.0.RELEASE/spring-plugin-core-1.2.0.RELEASE.jar!/org/springframework/plugin/core/PluginRegistry.class

The class hierarchy was loaded from the following locations:

    org.springframework.plugin.core.PluginRegistry: file:/Users/imdongbin/.m2/repository/org/springframework/plugin/spring-plugin-core/1.2.0.RELEASE/spring-plugin-core-1.2.0.RELEASE.jar

Action:

Correct the classpath of your application so that it contains a single, compatible version of org.springframework.plugin.core.PluginRegistry

Process finished with exit code 0

왠만하면 다 손으로 따라가고 싶어서 이리 저리 해봤는데 이번엔 영 안되네요 ㅠㅠ

답변 3

·

답변을 작성해보세요.

1

나물이님의 프로필

나물이

2022.07.13

스프링부트상위 버전은 아래로 참고하세용

<dependency>
<groupId>org.springframework.data</groupId>
<artifactId>spring-data-rest-hal-explorer</artifactId>
</dependency>
이상헌님의 프로필

이상헌

2022.11.04

감사합니다. 이걸로 해결했네요.

0

jhj13062004님의 프로필

jhj13062004

2021.01.08

pom.xml 의 springfox-swagger2 와 springfox-swagger-ui 의 버젼을 둘다 3.0.0 으로 수정하시면 강의 코드 dependency 와 동일하게 하여도 잘 동작합니다.

-----------

위의 방법을 해본 결과, localhost:8088/swagger-ui.html#/ 은 동작하지 않는걸 확인했습니다. 이유를 잘 모르겠습니다.

0

안녕하세요, 이도원입니다. 

강의에 사용된 버전은 Spring Boot 2.2 버전이고, 나머지 라이브러리들도 거기에 맞춰서 설정되어 있습니다.

아직 최신 버전에 맞춰 업데이트가 되지 못했습니다. 올해 상반기 중으로 업데이트 할 예정이니 최신 버전으로의 업데이트는 조금 기다려 주시기 바랍니다.

만약 설정하신 것처럼 2.4 버전을 사용할 경우에는, spring-data-rest-hal-browser 를 현재 사용할 수 없다고 나오지만, 2.3.7.RELEASE 버전으로 설정할 경우에는 사용가능 합니다. 다만, 기존 강의에 사용했던 코드말고 다음 링크에 있는 코드로 변경해서 작업하셔서 합니다. 

간략하게 HAL-BROWSER 관련 된 예제를 아래 github 사이트에 올려 놓았으니 참고하시기 바랍니다. 

감사합니다. 

https://github.com/edowon/hal-browser-demo

https://spring.io/guides/gs/rest-hateoas/