Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Could not find class [org.springframework.boot.actuate.autoconfigure.endpoint.EndpointAutoConfiguration] + Spring Boot 2 #746

Closed
sivanagaiah opened this issue Nov 14, 2019 · 2 comments
Labels

Comments

@sivanagaiah
Copy link

sivanagaiah commented Nov 14, 2019

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

@dlsrb6342
Copy link
Member

Could you try with spring-boot-starter-actuator not spring-boot-actuator?

@sivanagaiah
Copy link
Author

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 .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants