resilience4j版本:1.1.0
java版本:1.8
Spring Boot:2.2.0
我试图用springboot项目配置resilience4j,但是找不到类
org.springframework.boot.springapplication:应用程序运行失败java.lang.illegalargumentexception:在org.springframework.util.classutils.resolveclassname(classutils)中找不到类[org.springframework.boot.actuate.autoconfigure.endpoint.endpointautoconfiguration]。java:327)
java代码如下:
@RateLimiter(name ="service1",fallbackMethod = "rateLimiterfallback")
@PostMapping(value = "${URL_AUTH}")
public ResponseEntity<AuthRespDTO> fetchToken(@RequestParam("userId") String Id, @RequestParam("password") String pwd, HttpServletRequest httpRequest) {
}
application.yml如下
resilience4j.ratelimiter:
instances:
service1:
limitForPeriod: 1
limitRefreshPeriod: 100000
timeoutDuration: 1000ms
我在pom.xml中提到了以下依赖项。
<dependency>
<groupId>io.github.resilience4j</groupId>
<artifactId>resilience4j-spring-boot2</artifactId>
<version>1.1.0</version>
</dependency>
<dependency>
<groupId>io.github.resilience4j</groupId>
<artifactId>resilience4j-ratelimiter</artifactId>
<version>1.1.0</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-actuator</artifactId>
<version>2.2.0.RELEASE</version>
</dependency>
请帮我解决这个问题。
暂无答案!
目前还没有任何答案,快来回答吧!