[Error] Spring Boot - The following method did not exist: org.springframework.plugin.core.PluginRegistry. 해결 - Swaager2 관련 에러

GilLog·2021년 6월 14일
0

에러

목록 보기
11/17
post-custom-banner

🙆‍♂️ import 🙇‍♂️

The following method did not exist: 'org.springframework.plugin.core.PluginRegistry[StackOverflow]


문제 상황

Swagger2를 Spring Boot Project에 적용 하던 중,

아래와 같은 오류와 함께 프로젝트가 시작되지 않았다.


***************************
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.hateoas.server.core.DelegatingLinkRelationProvider.<init>(DelegatingLinkRelationProvider.java:36)

The following method did not exist:

    org.springframework.plugin.core.PluginRegistry.of([Lorg/springframework/plugin/core/Plugin;)Lorg/springframework/plugin/core/PluginRegistry;

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

    jar:file:/Users/gillog/.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/gillog/.m2/repository/org/springframework/plugin/spring-plugin-core/1.2.0.RELEASE/spring-plugin-core-1.2.0.RELEASE.jar
2

Action:

핵심 문구

나는 해당 에러의 핵심 문구로

The following method did not exist:

    org.springframework.plugin.core.PluginRegistry.of

이 부분을 정하고, 구글 신의 도움을 청했다.


해결

문제의 원인사용하려던 spring.fox 2.9.2 version에는 org.springframework.plugin.core.Plugin이 removed 되어 발생한 오류였다.

하여 해당 버전을 snapshot으로 변경하였다.

pom.xmldependencyrepository를 추가해주었다.

<dependency>
  <groupId>io.springfox</groupId>
  <artifactId>springfox-swagger2</artifactId>
  <version>3.0.0-SNAPSHOT</version>
</dependency>

<repositories>
  <repository>
    <id>jcenter-snapshots</id>
    <name>jcenter</name>
    <url>http://oss.jfrog.org/artifactory/oss-snapshot-local/</url>
  </repository>
</repositories>

하여 문제 없이 잘 실행되었다!

오늘도 해결 :) 🌟

profile
🚀 기록보단 길록을 20.10 ~ 22.02 ⭐ Move To : https://gil-log.github.io/
post-custom-banner

0개의 댓글