Step 1: Create an application from https://start.spring.io with a dependency of spring-cloud-config-server
.
Setp 2: Annotate your main application class with @EnableConfigServer
Step 3: Add below properties in application.properties
#Uncomment below section to use git as config location
spring.profiles.active=git
spring.cloud.config.server.git.uri=https://github.com/awesome-bank/awesome-bank-config.git
spring.cloud.config.server.git.clone-on-start=true
spring.cloud.config.server.git.default-label=main
#Uncomment below section to use project classpath as config location
#spring.profiles.active=native
#spring.cloud.config.server.native.search-locations=classpath:/configs
#Uncomment below section to use system path as config location
#spring.profiles.active=native
#spring.cloud.config.server.native.search-locations=file:///C:/code/bank/config-server/src/main/resources/configs