io.github的问题.(SpelResolverConfigurationOnMissingBean.spelRes



我使用io.github.resilience4j。1.6.1版本的一切都很好,但当升级到1.7.1版本时,我的应用程序没有运行。下面是我的代码修改

我的pom.xml依赖项

<dependency>
<groupId>io.github.resilience4j</groupId>
<artifactId>resilience4j-core</artifactId>
<version>1.7.1</version>
</dependency>
<dependency>
<groupId>io.github.resilience4j</groupId>
<artifactId>resilience4j-spring-boot2</artifactId>
<version>1.7.1</version>
</dependency>

这里是应用程序。改过的变化

resilience4j.circuitbreaker.configs.default.registerHealthIndicator=true
resilience4j.circuitbreaker.configs.default.slidingWindowSize= 10
resilience4j.circuitbreaker.configs.default.minimumNumberOfCalls=5
resilience4j.circuitbreaker.configs.default.permittedNumberOfCallsInHalfOpenState= 3
resilience4j.circuitbreaker.configs.default.automaticTransitionFromOpenToHalfOpenEnabled=true
resilience4j.circuitbreaker.configs.default.waitDurationInOpenState=5s
resilience4j.circuitbreaker.configs.default.failureRateThreshold=50
resilience4j.circuitbreaker.configs.default.eventConsumerBufferSize=10
resilience4j.circuitbreaker.configs.shared.slidingWindowSize=100
resilience4j.circuitbreaker.configs.shared.permittedNumberOfCallsInHalfOpenState=30
resilience4j.circuitbreaker.configs.shared.waitDurationInOpenState=1s
resilience4j.circuitbreaker.configs.shared.failureRateThreshold=50
resilience4j.circuitbreaker.configs.shared.eventConsumerBufferSize=10
resilience4j.circuitbreaker.instances.profile.registerHealthIndicator=true
resilience4j.circuitbreaker.instances.profile.slidingWindowSize=10
resilience4j.circuitbreaker.instances.profile.minimumNumberOfCalls=10
resilience4j.circuitbreaker.instances.profile.permittedNumberOfCallsInHalfOpenState=3
resilience4j.circuitbreaker.instances.profile.waitDurationInOpenState=5s
resilience4j.circuitbreaker.instances.profile.failureRateThreshold=50
resilience4j.circuitbreaker.instances.profile.eventConsumerBufferSize=10
resilience4j.retry.configs.default.maxAttempts=3
resilience4j.retry.configs.default.waitDuration=100
resilience4j.retry.instances.profile.baseConfig=default
resilience4j.bulkhead.configs.default.maxConcurrentCalls=30
resilience4j.bulkhead.configs.instances.profile.maxWaitDuration=10ms
resilience4j.bulkhead.configs.instances.profile.maxConcurrentCalls=20
resilience4j.thread-pool-bulkhead.configs.default.maxThreadPoolSize=4
resilience4j.thread-pool-bulkhead.configs.default.coreThreadPoolSize=2
resilience4j.thread-pool-bulkhead.configs.default.queueCapacity=2
resilience4j.thread-pool-bulkhead.instances.profile.maxThreadPoolSize=1
resilience4j.thread-pool-bulkhead.instances.profile.coreThreadPoolSize=1
resilience4j.thread-pool-bulkhead.instances.profile.queueCapacity=1
resilience4j.ratelimiter.configs.default.registerHealthIndicator=false
resilience4j.ratelimiter.configs.default.limitForPeriod=10
resilience4j.ratelimiter.configs.default.limitRefreshPeriod=1s
resilience4j.ratelimiter.configs.default.timeoutDuration=0
resilience4j.ratelimiter.configs.default.eventConsumerBufferSize=100
resilience4j.timelimiter.configs.default.cancelRunningFuture=false
resilience4j.timelimiter.configs.default.timeoutDuration=2s
resilience4j.timelimiter.instances.profile.baseConfig=default

这里是控制器API的变化

private static final String PROFILE="profile";    

@GetMapping("/{programType}/profile")
@AdobeIOAuthentication
@RateLimiter(name = PROFILE)
@TimeLimiter(name = PROFILE)
@CircuitBreaker(name = PROFILE)
@Bulkhead(name = PROFILE)

当我得到构建

时得到错误
Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
2021-08-11 14:37:21.503 IST ERROR requestId=NA x-correlation-id=NA 17200 --- [           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:
io.github.resilience4j.spelresolver.autoconfigure.SpelResolverConfigurationOnMissingBean.spelResolver(SpelResolverConfigurationOnMissingBean.java:54)
The following method did not exist:
'io.github.resilience4j.spelresolver.SpelResolver io.github.resilience4j.spelresolver.configure.SpelResolverConfiguration.spelResolver(org.springframework.expression.spel.standard.SpelExpressionParser, org.springframework.core.ParameterNameDiscoverer, org.springframework.beans.factory.BeanFactory)'
The method's class, io.github.resilience4j.spelresolver.configure.SpelResolverConfiguration, is available from the following locations:
jar:file:/C:/Users/169576/.m2/repository/io/github/resilience4j/resilience4j-spring/1.6.0/resilience4j-spring-1.6.0.jar!/io/github/resilience4j/spelresolver/configure/SpelResolverConfiguration.class
The class hierarchy was loaded from the following locations:
io.github.resilience4j.spelresolver.configure.SpelResolverConfiguration: file:/C:/Users/169576/.m2/repository/io/github/resilience4j/resilience4j-spring/1.6.0/resilience4j-spring-1.6.0.jar

有人能帮我解决这个问题吗?

尝试1.7.0版本

<dependency>
<groupId>io.github.resilience4j</groupId>
<artifactId>resilience4j-core</artifactId>
<version>1.7.0</version>
</dependency>
<dependency>
<groupId>io.github.resilience4j</groupId>
<artifactId>resilience4j-spring-boot2</artifactId>
<version>1.7.0</version>
</dependency>

我遇到过这个问题。我也更新到1.7.0版本,但它不工作。我看到日志信息显示版本参考如下:

io.github.resilience4j.spelresolver.configure。SpelResolverConfiguration:文件:C:/用户/169576/.m2/仓库/io/github/resilience4j/resilience4j-spring/1.6.0/resilience4j-spring -1.6.0. jar

我们只需要跟踪日志并将版本更新到1.6.0意味着日志中相同的版本

相关内容

  • 没有找到相关文章

最新更新