Search code examples
javaspringspring-bootnetflix-eurekacamunda

Camunda 7, Spring Boot, Eureka issue


We have created a microservice with Spring boot & embedded Camunda 7 which we are trying to register on Eureka server, but we are getting below error.

UnsatisfiedDependencyException: Error creating bean with name ‘scopedTarget.eurekaClient’

We are using the below versions Spring-Boot: v3.2.5, Spring cloud: 2023.0.2, Camunda Platform: v7.21.0, Camunda Platform Spring Boot Starter: v7.21.0, Java 17


Solution

  • I resolved this issue by doing the following steps add this dependency

    <dependency>
       <groupdId>com.netflix.eureka</groupdId>
       <artifactId>eureka-client-jersey3</artifactId>
    </dependency>
    

    and create a bean

    @Configuration
    public class Jersey3TransportClientFactoriesConfig{
      @Bean
      public Jersey3TransportClientFactories jersey3TransportClientFactories(){
        return new Jersey3TransportClientFactories();
      }
    }
    

    in your application.yml

    eureka:
      client:
        serviceUrl:
          defaultZone: http://localhost:8761/eureka
        register-with-eureka: true
        fetch-registry: false
    

    Please let me know if any issues.