获取url的Json响应http://localhost:8888/limits-服务/默认。它没有读取文件limit-service.properties
{"name":"限制服务";,"配置文件":["最大值";],"标签":无效的"版本":无效的"状态":无效的"propertySources":[]}
应用程序属性
spring.application.name=spring-cloud-confg服务器
server.port=8888
spring.profiles.active=本地
spring.cloud.config.server.native.search-locations=file:///C:/Learning/configs-回购/
limit-service.properties(路径C:/Learning/configs-repo/(
限制服务最大值=8999
limits-service.minimum=8
SpringCloudConfigServerApplication.java
@EnableConfigServer
@SpringBootApplication
public class SpringCloudConfigServerApplication {
public static void main(String[] args) {
SpringApplication.run(SpringCloudConfigServerApplication.class, args);
}
}
你能帮我理解为什么它没有读取文件吗
它不适用于Spring boot 2.4.1和Spring Cloud配置服务器2020.0.0-M6。当我改为Spring引导2.3.7.RELEASE和Spring云配置服务器Hoxton时。SR9它正在工作