application.properties. server.port: 8888 spring.cloud.config.server.git.uri: file://${user.home}/config-repo where ${user.home}/config-repo is a git repository containing YAML and properties files. [Note] in Windows you need an extra "/" in the file URL if it is absolute with a drive prefix, e.g. file:///${user.home}/config-repo.
關於怎麼須要什麼jar包依賴,隨便找個帖子都有這就不說了,主要看這段git
spring.cloud.config.server.git.uri: file://${user.home}/config-repo
配置後經過請求ip:portspring
/{application}/{profile}[/{label}] /{application}-{profile}.yml /{label}/{application}-{profile}.yml /{application}-{profile}.properties /{label}/{application}-{profile}.properties
案例:localhost:8081/master/testwindows