Spring Cloud 配置客户端不适用于 Spring Boot 2.5.1,但适用于 2.5.0。
应用程序-dev.yml
spring:
config:
import: configserver:http://localhost:8270/
cloud:
config:
enabled: true
Run Code Online (Sandbox Code Playgroud)
错误
***************************
APPLICATION FAILED TO START
***************************
Description:
Config data location 'configserver:http://localhost:8270/' does not exist
Action:
Check that the value 'configserver:http://localhost:8270/' at class path resource [application-dev.yml] - 3:13 is correct, or prefix it with 'optional:'
Run Code Online (Sandbox Code Playgroud)
pom.xml
***************************
APPLICATION FAILED TO START
***************************
Description:
Config data location 'configserver:http://localhost:8270/' does not exist
Action:
Check that the value 'configserver:http://localhost:8270/' at class path resource [application-dev.yml] - 3:13 is …Run Code Online (Sandbox Code Playgroud)