digitalinnovationone / dio-springboot

636 stars 381 forks source link

Swagger x Springboot #9

Open heliospjunior opened 1 month ago

heliospjunior commented 1 month ago

Não estou conseguindo rodar aplicação da aula de Swagger:

Description:

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

    org.springframework.plugin.core.support.AbstractTypeAwareSupport$BeansOfTypeTargetSource.<init>(AbstractTypeAwareSupport.java:135)

The following method did not exist:

    'void org.springframework.util.Assert.notNull(java.lang.Object)'

The calling method's class, org.springframework.plugin.core.support.AbstractTypeAwareSupport$BeansOfTypeTargetSource, was loaded from the following location:

    jar:file:/C:/Users/Sabbathhj/.m2/repository/org/springframework/plugin/spring-plugin-core/1.2.0.RELEASE/spring-plugin-core-1.2.0.RELEASE.jar!/org/springframework/plugin/core/support/AbstractTypeAwareSupport$BeansOfTypeTargetSource.class

The called method's class, org.springframework.util.Assert, is available from the following locations:

    jar:file:/C:/Users/Sabbathhj/.m2/repository/org/springframework/spring-core/6.1.8/spring-core-6.1.8.jar!/org/springframework/util/Assert.class

The called method's class hierarchy was loaded from the following locations:

    org.springframework.util.Assert: file:/C:/Users/Sabbathhj/.m2/repository/org/springframework/spring-core/6.1.8/spring-core-6.1.8.jar

Action:

Correct the classpath of your application so that it contains compatible versions of the classes org.springframework.plugin.core.support.AbstractTypeAwareSupport$BeansOfTypeTargetSource and org.springframework.util.Assert

Process finished with exit code 1

Pesquisando, parece ser uma impompatibilidade entre Swagger e Springboot. Estou com Java 17, e Springboot 3.3.0

gVieiraX commented 3 weeks ago

Estou com o mesmo erro, já tentei de varias formas e não consegui ainda. Você conseguiu concertar? Já tentei pelo chatpgt, stack overflow e nada.

gVieiraX commented 3 weeks ago

Consegui resolver no mesmo dia, ainda precisa de ajuda?

heliospjunior commented 3 weeks ago

Consegui resolver no mesmo dia, ainda precisa de ajuda?

Opa! Boa noite Gabriel! I te responder hoje cedo, mas estava longe do PC. Tem que implantar como OpenAI ne?

gVieiraX commented 3 weeks ago

Salve Helio, boa noite! Não precisa cara, eu encontrei um solução simples, copiei o pom.xml que foi utilizado durante aula no meu arquivo e atualizei as dependências. Eu procurei saber sobre esse erro, e aparentemente acontece por conta das versões que utilizamos atualmente e que não tem mais suporte ou atualização.