springboot启动报错It was loaded from the following location

springboot启动报错

Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
2021-11-26 14:35:06.421 ERROR 723709 --- [           main] 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.context.annotation.CommonAnnotationBeanPostProcessor$ResourceElement.<init>(CommonAnnotationBeanPostProcessor.java:641)

The following method did not exist:

    'java.lang.String javax.annotation.Resource.lookup()'

The method's class, javax.annotation.Resource, is available from the following locations:

    jar:file:/lib/jsr250-api-1.0.jar!/javax/annotation/Resource.class
    jar:file:/lib/jakarta.annotation-api-1.3.5.jar!/javax/annotation/Resource.class

It was loaded from the following location:

    file:/lib/jsr250-api-1.0.jar


Action:

Correct the classpath of your application so that it contains a single, compatible version of javax.annotation.Resource

2021-11-26 14:35:06.501  WARN 723709 --- [           main] o.s.boot.SpringApplication               : Unable to close ApplicationContext

原因:
jsr250-api-1.0.jar和jakarta.annotation-api-1.3.5.jar 重复


解决:
到报错路径删除 jsr250-api-1.0.jar
比如这里的 file:/lib/jsr250-api-1.0.jar

  • 0
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
*************************** 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.boot.autoconfigure.flyway.FlywayAutoConfiguration$FlywayConfiguration.configureProperties(FlywayAutoConfiguration.java:255) The following method did not exist: 'org.flywaydb.core.api.configuration.FluentConfiguration org.flywaydb.core.api.configuration.FluentConfiguration.oracleSqlplus(boolean)' The calling method's class, org.springframework.boot.autoconfigure.flyway.FlywayAutoConfiguration$FlywayConfiguration, was loaded from the following location: jar:file:/D:/repository/org/springframework/boot/spring-boot-autoconfigure/3.1.0/spring-boot-autoconfigure-3.1.0.jar!/org/springframework/boot/autoconfigure/flyway/FlywayAutoConfiguration$FlywayConfiguration.class The called method's class, org.flywaydb.core.api.configuration.FluentConfiguration, is available from the following locations: jar:file:/D:/repository/org/flywaydb/flyway-core/9.20.1/flyway-core-9.20.1.jar!/org/flywaydb/core/api/configuration/FluentConfiguration.class The called method's class hierarchy was loaded from the following locations: org.flywaydb.core.api.configuration.FluentConfiguration: file:/D:/repository/org/flywaydb/flyway-core/9.20.1/flyway-core-9.20.1.jar Action: Correct the classpath of your application so that it contains compatible versions of the classes org.springframework.boot.autoconfigure.flyway.FlywayAutoConfiguration$FlywayConfiguration and org.flywaydb.core.api.configuration.FluentConfiguration Disconnected from the target VM, address: '127.0.0.1:52541', transport: 'socket' Process finished with exit code 1 怎么回事
07-22
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

cy谭

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值