Posts

Showing posts with the label Spring Cloud

Can Zuul Edge Server Be Used Without Eureka / Ribbon

Answer : Yes, it is totally possible.You have to use @EnableZuulProxy on your config class and config it something like this : zuul: routes: yourService: path: /yourService/** serviceId: yourService ribbon: eureka: enabled: false yourService: ribbon: listOfServers: localhost:8080 A sample usage can be like this: shared.microservice.customer.service1.url=zttp://127.0.0.1:8080/shared/microservice/customer/ shared.microservice.customer.service2.url=zttp://127.0.0.1:8181/shared/microservice/customer/ ribbon.eureka.enabled = false zuul.routes.customer-micro-service.path: /shared/microservice/customer/** zuul.routes.customer-micro-service.serviceId: customers customers.ribbon.listOfServers = zttp://ip:port1/shared/microservice/customer/,zttp://ip2:port2/shared/microservice/customer/

Bootstrap.yml Configuration Not Processed Anymore With Spring Cloud 2020.0

Answer : As pointed put by Nicoll, With Spring Cloud Vault 3.0 and Spring Boot 2.4, the bootstrap context initialization ( bootstrap.yml , bootstrap.properties ) of property sources was deprecated . This can be fixed in one of the 2 ways Use Spring Boot 2.4.0 Config Data API to import configuration from Vault (Preferred) Legacy Processing: Enable the bootstrap context either by setting the configuration property spring.cloud.bootstrap.enabled=true or by including the dependency <dependency> <groupId>org.springframework.cloud</groupId> <artifactId>spring-cloud-starter-bootstrap</artifactId> </dependency> 1. Use Spring Boot 2.4.0 Config Data API (Preferred) Move bootstrap.yml configuration to application.yml and updated file looks like below application.yml spring: cloud: vault: authentication: APPROLE app-role: role-id: ${role-id} secret-id: ${secret-id} role: pres-read app-role...