Configure Config Service and Load Configuration to other services
So now we are going to move our configurations of services to a centralized location and check it works or not.
When we choose filesystem as a configuration and we choose classpath then application.properties cannot be used to server same configuration to all but in case we choose file:// then we can create application.properties for common configuration.
Now create two properties files gateway-service.properties and user-service.properties name of the file is based on the name of the application given in application.properties of the services. In case if you change the name of the application (spring.application.name) then you also have to rename the file.
Move configuration from individual services to corresponding files.
User Service
Gateway Service
Now restart Config Service and then restart Gateway Service and User Service and it will works as before.