Spring cloud, config server can not start, how to config uri for git -
i pretty interested in spring cloud project , testing it, blocked immediately.
- in pom: added dependency:
<dependency> <groupid>org.springframework.cloud</groupid> <artifactid>spring-cloud-config-server</artifactid> </dependency>
- for main application:
@configuration @enableautoconfiguration @enableconfigserver public class springconfigserverapplication { public static void main(string[] args) { springapplication.run(springconfigserverapplication.class, args); } }
so based on documentation, need add enableconfigserver
, tried start it, error:
org.springframework.beans.factory.beancreationexception: error creating bean name 'environmentrepository' defined in class org.springframework.cloud.config.server.configserverconfiguration$gitrepositoryconfiguration: invocation of init method failed; nested exception java.lang.illegalstateexception: need configure uri git repository
so, how can config uri git repository? there nothing mentioned in documentation.
thanks more clarification
our example here. configuration application.yml
looks this:
spring: cloud: config: server: git: uri: https://github.com/spring-cloud-samples/config-repo
Comments
Post a Comment