我正在尝试在我的项目中使用服务器。我正在使用openJdk 11。
我不使用git URI。我使用了几个yml文件,它们位于资源配置文件夹下。
我的错误越来越少
***************************
APPLICATION FAILED TO START
***************************
Description:
Invalid config server configuration.
Action:
If you are using the git profile, you need to set a Git URI in your configuration. If you are using a native profile and have spring.cloud.config.server.bootstrap=true, you need to use a composite configuration.
Process finished with exit code 1发布于 2019-01-03 15:23:15
如果您正在使用特性,则需要为启动服务提供适当的配置。默认配置文件是git,您需要向包含配置的存储库提供URI。
参考文件:
Spring从git存储库(必须提供)中提取远程客户端的配置,如下面的示例所示:
spring:
cloud:
config:
server:
git:
uri: https://github.com/spring-cloud-samples/config-repo请参阅更多信息:start
发布于 2021-04-22 23:30:38
在配置服务器的application.property文件下面尝试
server.port = 8888
spring.cloud.config.server.native.search-locations=file:///C:/configprop/
spring.profiles.active=native发布于 2022-08-11 09:31:37
您需要按照以下方式配置applicarion.yml:
server:
port: 8888
spring:
cloud:
config:
server:
composite:
- type: native
search-locations: classpath:/shared
security:
user:
password: 'your-any-password'
eureka:
client:
service-url:
defaultZone: http://localhost:8761/eureka而你对其他应用程序的信任则存在于资源/共享文件夹中。
https://stackoverflow.com/questions/54006463
复制相似问题