As you realized we defane constants for client url's and it should not be 'localhost' for every environment of the application. We make our service's configurable by environment variables to gain more flexibility. Let's make it configurable from application.yaml file.
We have defined constants for client url's and it should not be 'localhost' for every environment of the application. We make our service's configurable by environment variables to gain more flexibility. Let's make it configurable from application.yaml file.
``` yaml
spring:
...
...
@@ -877,7 +877,7 @@ client:
url:${CUSTOMER_PATH:http://localhost:8081}
```
* So let's make it configurable from application.yaml file for customer-services under src/main/resources as below config
* So let's make port number configurable from application.yaml file for customer-services under src/main/resources as below config
```yaml
spring:
application:
...
...
@@ -887,7 +887,7 @@ server:
port:${PORT:8081}
```
* Also let's make it configurable from application.yaml file for product-services under src/main/resources as below config
* Also let's make port number configurable from application.yaml file for product-services under src/main/resources as below config