Thanks for raising a Resilience4j issue.
Please provide a brief description of your problem along with the versions you are using.
If possible, please also consider putting together a complete JUnit test that reproduces the issue.
Resilience4j version: 1.1.0
Java version: 1.8
Problem description:
I am trying to configure the Resilience4j with spring boot project but getting below class not found
org.springframework.boot.SpringApplication: Application run failed
java.lang.IllegalArgumentException: Could not find class [org.springframework.boot.actuate.autoconfigure.endpoint.EndpointAutoConfiguration]
at org.springframework.util.ClassUtils.resolveClassName(ClassUtils.java:327)
Java Code as follows :
@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 as mentioned below
resilience4j.ratelimiter:
instances:
service1:
limitForPeriod: 1
limitRefreshPeriod: 100000
timeoutDuration: 1000ms
I have below dependencies mentioned in 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>
Please help me in resolving the issue .
Thanks
Could you try with spring-boot-starter-actuator not spring-boot-actuator?
Thank You For your response , I have added spring-boot-starter-actuator and spring-boot-starter-aop to fix issue . I did not update the ticket .
Most helpful comment
Could you try with
spring-boot-starter-actuatornotspring-boot-actuator?