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