configure it according to the spring cloud config configuration method on the Internet, and there is a startup error all the time
@EnableConfigServer
@SpringBootApplication
public class ConfigServerGitApplication {
public static void main(String[] args) {
SpringApplication.run(ConfigServerGitApplication.class, args);
}
}
spring:
application:
name: config-server
cloud:
config:
server:
git:
uri: https://github.com/jinqiang12345/
username: xxxx
pass: xxxx
search-paths:
- spring-boot-examples
default-label: master
server:
port: 1201
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.1.0.BUILD-SNAPSHOT</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<java.version>1.8</java.version>
<spring-cloud.version>Finchley.BUILD-SNAPSHOT</spring-cloud.version>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-config-server</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
:
2018-06-01 09:01:03.010 INFO 70244 --- [ main] c.e.demo.ConfigServerGit1Application : No active profile set, falling back to default profiles: default
2018-06-01 09:01:03.010 INFO 70244 --- [ main] ConfigServletWebServerApplicationContext : Refreshing org.springframework.boot.web.servlet.context.AnnotationConfigServletWebServerApplicationContext@50dfbc58: startup date [Fri Jun 01 09:01:03 CST 2018]; parent: org.springframework.context.annotation.AnnotationConfigApplicationContext@6ca8564a
2018-06-01 09:01:03.431 INFO 70244 --- [ main] o.s.cloud.context.scope.GenericScope : BeanFactory id=2f3065cd-4894-3f9c-aa01-b1ff1ac6b06c
2018-06-01 09:01:03.456 INFO 70244 --- [ main] trationDelegate$BeanPostProcessorChecker : Bean "org.springframework.cloud.autoconfigure.ConfigurationPropertiesRebinderAutoConfiguration" of type [org.springframework.cloud.autoconfigure.ConfigurationPropertiesRebinderAutoConfiguration$$EnhancerBySpringCGLIB$$11855985] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2018-06-01 09:01:03.581 INFO 70244 --- [ main] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat initialized with port(s): 1201 (http)
2018-06-01 09:01:03.598 INFO 70244 --- [ main] o.apache.catalina.core.StandardService : Starting service [Tomcat]
2018-06-01 09:01:03.598 INFO 70244 --- [ main] org.apache.catalina.core.StandardEngine : Starting Servlet Engine: Apache Tomcat/8.5.31
2018-06-01 09:01:03.598 INFO 70244 --- [ost-startStop-1] o.a.catalina.core.AprLifecycleListener : The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: [C:\Program Files\Java\jre1.8.0_171\bin;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;C:/Program Files/Java/jre1.8.0_171/bin/server;C:/Program Files/Java/jre1.8.0_171/bin;C:/Program Files/Java/jre1.8.0_171/lib/amd64;C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\Program Files (x86)\Intel\iCLS Client\;C:\Program Files\Intel\iCLS Client\;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files\TortoiseSVN\bin;"C:\Java1\jdk1.8.0_171\bin;C:\Java1\jdk1.8.0_171\jre\bin";C:\scala\bin;C:\scala\bin;C:\scala\jre\bin;C:\Program Files\Git\cmd;C:\Program Files (x86)\Yarn\bin\;C:\Program Files\nodejs\;C:\Program Files\erl9.3\bin;C:\Program Files\PuTTY\;C:\Users\jinqiang\AppData\Local\Programs\Python\Python36\Scripts\;C:\Users\jinqiang\AppData\Local\Programs\Python\Python36\;C:\Users\jinqiang\AppData\Local\Microsoft\WindowsApps;D:\Microsoft VS Code\bin;C:\Users\jinqiang\AppData\Local\GitHubDesktop\bin;C:\Users\jinqiang\AppData\Local\Yarn\bin;C:\Users\jinqiang\AppData\Roaming\npm;C:\Users\jinqiang\Desktop;;.]
2018-06-01 09:01:03.656 INFO 70244 --- [ost-startStop-1] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring embedded WebApplicationContext
2018-06-01 09:01:03.656 INFO 70244 --- [ost-startStop-1] o.s.web.context.ContextLoader : Root WebApplicationContext: initialization completed in 646 ms
2018-06-01 09:01:04.306 INFO 70244 --- [ost-startStop-1] o.s.b.w.servlet.ServletRegistrationBean : Servlet dispatcherServlet mapped to [/]
2018-06-01 09:01:04.306 INFO 70244 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean : Mapping filter: "characterEncodingFilter" to: [/*]
2018-06-01 09:01:04.306 INFO 70244 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean : Mapping filter: "hiddenHttpMethodFilter" to: [/*]
2018-06-01 09:01:04.306 INFO 70244 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean : Mapping filter: "httpPutFormContentFilter" to: [/*]
2018-06-01 09:01:04.306 INFO 70244 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean : Mapping filter: "requestContextFilter" to: [/*]
2018-06-01 09:01:04.306 INFO 70244 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean : Mapping filter: "httpTraceFilter" to: [/*]
2018-06-01 09:01:04.306 INFO 70244 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean : Mapping filter: "webMvcMetricsFilter" to: [/*]
2018-06-01 09:01:04.353 INFO 70244 --- [ main] o.s.w.s.handler.SimpleUrlHandlerMapping : Mapped URL path [/**/favicon.ico] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler]
2018-06-01 09:01:04.447 INFO 70244 --- [ main] s.w.s.m.m.a.RequestMappingHandlerAdapter : Looking for @ControllerAdvice: org.springframework.boot.web.servlet.context.AnnotationConfigServletWebServerApplicationContext@50dfbc58: startup date [Fri Jun 01 09:01:03 CST 2018]; parent: org.springframework.context.annotation.AnnotationConfigApplicationContext@6ca8564a
2018-06-01 09:01:04.476 INFO 70244 --- [ main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/error]}" onto public org.springframework.http.ResponseEntity<java.util.Map<java.lang.String, java.lang.Object>> org.springframework.boot.autoconfigure.web.servlet.error.BasicErrorController.error(javax.servlet.http.HttpServletRequest)
2018-06-01 09:01:04.476 INFO 70244 --- [ main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/error],produces=[text/html]}" onto public org.springframework.web.servlet.ModelAndView org.springframework.boot.autoconfigure.web.servlet.error.BasicErrorController.errorHtml(javax.servlet.http.HttpServletRequest,javax.servlet.http.HttpServletResponse)
2018-06-01 09:01:04.492 INFO 70244 --- [ main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/encrypt],methods=[POST]}" onto public java.lang.String org.springframework.cloud.config.server.encryption.EncryptionController.encrypt(java.lang.String,org.springframework.http.MediaType)
2018-06-01 09:01:04.492 INFO 70244 --- [ main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/encrypt/{name}/{profiles}],methods=[POST]}" onto public java.lang.String org.springframework.cloud.config.server.encryption.EncryptionController.encrypt(java.lang.String,java.lang.String,java.lang.String,org.springframework.http.MediaType)
2018-06-01 09:01:04.492 INFO 70244 --- [ main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/decrypt/{name}/{profiles}],methods=[POST]}" onto public java.lang.String org.springframework.cloud.config.server.encryption.EncryptionController.decrypt(java.lang.String,java.lang.String,java.lang.String,org.springframework.http.MediaType)
2018-06-01 09:01:04.492 INFO 70244 --- [ main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/decrypt],methods=[POST]}" onto public java.lang.String org.springframework.cloud.config.server.encryption.EncryptionController.decrypt(java.lang.String,org.springframework.http.MediaType)
2018-06-01 09:01:04.492 INFO 70244 --- [ main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/encrypt/status],methods=[GET]}" onto public java.util.Map<java.lang.String, java.lang.Object> org.springframework.cloud.config.server.encryption.EncryptionController.status()
2018-06-01 09:01:04.492 INFO 70244 --- [ main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/key],methods=[GET]}" onto public java.lang.String org.springframework.cloud.config.server.encryption.EncryptionController.getPublicKey()
2018-06-01 09:01:04.492 INFO 70244 --- [ main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/key/{name}/{profiles}],methods=[GET]}" onto public java.lang.String org.springframework.cloud.config.server.encryption.EncryptionController.getPublicKey(java.lang.String,java.lang.String)
2018-06-01 09:01:04.492 INFO 70244 --- [ main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/{name}-{profiles}.properties],methods=[GET]}" onto public org.springframework.http.ResponseEntity<java.lang.String> org.springframework.cloud.config.server.environment.EnvironmentController.properties(java.lang.String,java.lang.String,boolean) throws java.io.IOException
2018-06-01 09:01:04.492 INFO 70244 --- [ main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/{name}-{profiles}.yml || /{name}-{profiles}.yaml],methods=[GET]}" onto public org.springframework.http.ResponseEntity<java.lang.String> org.springframework.cloud.config.server.environment.EnvironmentController.yaml(java.lang.String,java.lang.String,boolean) throws java.lang.Exception
2018-06-01 09:01:04.492 INFO 70244 --- [ main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/{name}/{profiles:.*[^-].*}],methods=[GET]}" onto public org.springframework.cloud.config.environment.Environment org.springframework.cloud.config.server.environment.EnvironmentController.defaultLabel(java.lang.String,java.lang.String)
2018-06-01 09:01:04.492 INFO 70244 --- [ main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/{name}/{profiles}/{label:.*}],methods=[GET]}" onto public org.springframework.cloud.config.environment.Environment org.springframework.cloud.config.server.environment.EnvironmentController.labelled(java.lang.String,java.lang.String,java.lang.String)
2018-06-01 09:01:04.492 INFO 70244 --- [ main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/{name}-{profiles}.json],methods=[GET]}" onto public org.springframework.http.ResponseEntity<java.lang.String> org.springframework.cloud.config.server.environment.EnvironmentController.jsonProperties(java.lang.String,java.lang.String,boolean) throws java.lang.Exception
2018-06-01 09:01:04.492 INFO 70244 --- [ main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/{label}/{name}-{profiles}.yml || /{label}/{name}-{profiles}.yaml],methods=[GET]}" onto public org.springframework.http.ResponseEntity<java.lang.String> org.springframework.cloud.config.server.environment.EnvironmentController.labelledYaml(java.lang.String,java.lang.String,java.lang.String,boolean) throws java.lang.Exception
2018-06-01 09:01:04.492 INFO 70244 --- [ main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/{label}/{name}-{profiles}.json],methods=[GET]}" onto public org.springframework.http.ResponseEntity<java.lang.String> org.springframework.cloud.config.server.environment.EnvironmentController.labelledJsonProperties(java.lang.String,java.lang.String,java.lang.String,boolean) throws java.lang.Exception
2018-06-01 09:01:04.492 INFO 70244 --- [ main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/{label}/{name}-{profiles}.properties],methods=[GET]}" onto public org.springframework.http.ResponseEntity<java.lang.String> org.springframework.cloud.config.server.environment.EnvironmentController.labelledProperties(java.lang.String,java.lang.String,java.lang.String,boolean) throws java.io.IOException
2018-06-01 09:01:04.492 INFO 70244 --- [ main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/{name}/{profile}/**],methods=[GET],params=[useDefaultLabel]}" onto public java.lang.String org.springframework.cloud.config.server.resource.ResourceController.retrieve(java.lang.String,java.lang.String,javax.servlet.http.HttpServletRequest,boolean) throws java.io.IOException
2018-06-01 09:01:04.492 INFO 70244 --- [ main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/{name}/{profile}/{label}/**],methods=[GET]}" onto public java.lang.String org.springframework.cloud.config.server.resource.ResourceController.retrieve(java.lang.String,java.lang.String,java.lang.String,javax.servlet.http.HttpServletRequest,boolean) throws java.io.IOException
2018-06-01 09:01:04.492 INFO 70244 --- [ main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/{name}/{profile}/{label}/**],methods=[GET],produces=[application/octet-stream]}" onto public synchronized byte[] org.springframework.cloud.config.server.resource.ResourceController.binary(java.lang.String,java.lang.String,java.lang.String,javax.servlet.http.HttpServletRequest) throws java.io.IOException
2018-06-01 09:01:04.508 INFO 70244 --- [ main] o.s.w.s.handler.SimpleUrlHandlerMapping : Mapped URL path [/webjars/**] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler]
2018-06-01 09:01:04.508 INFO 70244 --- [ main] o.s.w.s.handler.SimpleUrlHandlerMapping : Mapped URL path [/**] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler]
2018-06-01 09:01:04.802 INFO 70244 --- [ main] o.s.b.a.e.web.EndpointLinksResolver : Exposing 2 endpoint(s) beneath base path "/actuator"
2018-06-01 09:01:04.802 INFO 70244 --- [ main] s.b.a.e.w.s.WebMvcEndpointHandlerMapping : Mapped "{[/actuator/health],methods=[GET],produces=[application/vnd.spring-boot.actuator.v2+json || application/json]}" onto public java.lang.Object org.springframework.boot.actuate.endpoint.web.servlet.AbstractWebMvcEndpointHandlerMapping$OperationHandler.handle(javax.servlet.http.HttpServletRequest,java.util.Map<java.lang.String, java.lang.String>)
2018-06-01 09:01:04.802 INFO 70244 --- [ main] s.b.a.e.w.s.WebMvcEndpointHandlerMapping : Mapped "{[/actuator/health/{component}/{instance}],methods=[GET],produces=[application/vnd.spring-boot.actuator.v2+json || application/json]}" onto public java.lang.Object org.springframework.boot.actuate.endpoint.web.servlet.AbstractWebMvcEndpointHandlerMapping$OperationHandler.handle(javax.servlet.http.HttpServletRequest,java.util.Map<java.lang.String, java.lang.String>)
2018-06-01 09:01:04.802 INFO 70244 --- [ main] s.b.a.e.w.s.WebMvcEndpointHandlerMapping : Mapped "{[/actuator/health/{component}],methods=[GET],produces=[application/vnd.spring-boot.actuator.v2+json || application/json]}" onto public java.lang.Object org.springframework.boot.actuate.endpoint.web.servlet.AbstractWebMvcEndpointHandlerMapping$OperationHandler.handle(javax.servlet.http.HttpServletRequest,java.util.Map<java.lang.String, java.lang.String>)
2018-06-01 09:01:04.802 INFO 70244 --- [ main] s.b.a.e.w.s.WebMvcEndpointHandlerMapping : Mapped "{[/actuator/info],methods=[GET],produces=[application/vnd.spring-boot.actuator.v2+json || application/json]}" onto public java.lang.Object org.springframework.boot.actuate.endpoint.web.servlet.AbstractWebMvcEndpointHandlerMapping$OperationHandler.handle(javax.servlet.http.HttpServletRequest,java.util.Map<java.lang.String, java.lang.String>)
2018-06-01 09:01:04.802 INFO 70244 --- [ main] s.b.a.e.w.s.WebMvcEndpointHandlerMapping : Mapped "{[/actuator],methods=[GET],produces=[application/vnd.spring-boot.actuator.v2+json || application/json]}" onto protected java.util.Map<java.lang.String, java.util.Map<java.lang.String, org.springframework.boot.actuate.endpoint.web.Link>> org.springframework.boot.actuate.endpoint.web.servlet.WebMvcEndpointHandlerMapping.links(javax.servlet.http.HttpServletRequest,javax.servlet.http.HttpServletResponse)
2018-06-01 09:01:04.833 INFO 70244 --- [ main] o.s.j.e.a.AnnotationMBeanExporter : Registering beans for JMX exposure on startup
2018-06-01 09:01:04.833 INFO 70244 --- [ main] o.s.j.e.a.AnnotationMBeanExporter : Bean with name "environmentManager" has been autodetected for JMX exposure
2018-06-01 09:01:04.833 INFO 70244 --- [ main] o.s.j.e.a.AnnotationMBeanExporter : Bean with name "configurationPropertiesRebinder" has been autodetected for JMX exposure
2018-06-01 09:01:04.833 INFO 70244 --- [ main] o.s.j.e.a.AnnotationMBeanExporter : Bean with name "refreshScope" has been autodetected for JMX exposure
2018-06-01 09:01:04.833 INFO 70244 --- [ main] o.s.j.e.a.AnnotationMBeanExporter : Located managed bean "environmentManager": registering with JMX server as MBean [org.springframework.cloud.context.environment:name=environmentManager,type=EnvironmentManager]
2018-06-01 09:01:04.849 INFO 70244 --- [ main] o.s.j.e.a.AnnotationMBeanExporter : Located managed bean "refreshScope": registering with JMX server as MBean [org.springframework.cloud.context.scope.refresh:name=refreshScope,type=RefreshScope]
2018-06-01 09:01:04.849 INFO 70244 --- [ main] o.s.j.e.a.AnnotationMBeanExporter : Located managed bean "configurationPropertiesRebinder": registering with JMX server as MBean [org.springframework.cloud.context.properties:name=configurationPropertiesRebinder,context=50dfbc58,type=ConfigurationPropertiesRebinder]
2018-06-01 09:01:04.865 INFO 70244 --- [ main] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat started on port(s): 1201 (http) with context path ""
2018-06-01 09:01:04.880 INFO 70244 --- [ main] c.e.demo.ConfigServerGit1Application : Started ConfigServerGit1Application in 2.481 seconds (JVM running for 2.846)