Bom dia . Estou com alguns problemas ao configurar o Eureka, após realizar a configuração , ao subir a aplicação de pagamentos recebo um erro conforme abaixo:
java.lang.IllegalStateException: Error processing condition on org.springframework.cloud.netflix.eureka.config.DiscoveryClientOptionalArgsConfiguration.defaultEurekaClientHttpRequestFactorySupplier
Minhas classes envolvidas são:
PagamentosApplication.java
package br.com.alurafood.pagamentos;
import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.cloud.netflix.eureka.EnableEurekaClient;
@SpringBootApplication @EnableEurekaClient public class PagamentosApplication {
public static void main(String[] args) {
SpringApplication.run(PagamentosApplication.class, args);
}
}
application.properties
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver spring.datasource.url=jdbc:mysql://localhost:3306/alurafood-pagamento?createDatabaseIfNotExist=true spring.datasource.username=root spring.datasource.password=Od@ir1626 spring.jpa.show-sql=true
spring.application.name=pagamentos-ms eureka.client.serviceUrl.defaultZone=http://localhost:8081/eureka server.port=0
POM.xml
4.0.0 org.springframework.boot spring-boot-starter-parent 2.7.5 br.com.alurafood pagamentos 0.0.1-SNAPSHOT pagamentos MS de pagamentos da AluraFood <java.version>17</java.version> org.springframework.boot spring-boot-starter-data-jpa org.springframework.boot spring-boot-starter-validation org.springframework.boot spring-boot-starter-web org.flywaydb flyway-core 9.5.1 org.flywaydb flyway-mysql 9.5.1
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
<scope>runtime</scope>
<optional>true</optional>
</dependency>
<dependency>
<groupId>com.mysql</groupId>
<artifactId>mysql-connector-j</artifactId>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>br.com.alurafood</groupId>
<artifactId>pagamentos</artifactId>
<version>0.0.1-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-netflix-eureka-client</artifactId>
<version>3.1.4</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<excludes>
<exclude>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
</exclude>
</excludes>
</configuration>
</plugin>
</plugins>
</build>