我在配置服务器上遇到问题,在这里,
说明:
无效的配置服务器配置。
操作:
如果您使用的是 git 配置文件,则需要在配置中设置 Git URI。如果您使用本机配置文件并且 spring.cloud.config.server.bootstrap=true,则需要使用复合配置。
我的主要课程:
package com.example.configserver;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.config.server.EnableConfigServer;
@EnableConfigServer
@SpringBootApplication
public class ConfigServerApplication {
public static void main(String[] args) {
SpringApplication.run(ConfigServerApplication.class, args);
}
} 我的 bootstrap.properties 文件:
#Server port
server.port = 8981
#Git repo location
spring.cloud.config.server.git.uri= D://Learning//Java//config-serve//config-server
#Verify any repository issue in service startup
spring.cloud.config.server.git.cloneOnStart=true
#Disable security of the Management endpoint
management.security.enabled=false
**config-client.properties file:**
message=Hye Viewers