spring-cloud-config-server 服務器搭建

新建一個config git 倉庫

git@ubuntu:~/repo$ mkdir config.git
git@ubuntu:~/repo$ cd config.git
git@ubuntu:~/repo$ git --bare init

克隆config倉庫

Administrator@WL /d/workspace
$ git clone http://192.168.245.128:8000/config.git
Cloning into 'config'...
Username for 'http://192.168.245.128:8000': git
Password for 'http://[email protected]:8000':
remote: Counting objects: 4, done.
remote: Compressing objects: 100% (4/4), done.
remote: Total 4 (delta 0), reused 0 (delta 0)
Unpacking objects: 100% (4/4), done.
Administrator@WL /d/workspace
$ cd config/

Administrator@WL /d/workspace/config (master)

增加application.properties和blog.properties兩個配置文件

Administrator@WL /d/workspace/config (master)
$ touch blog.properties
Administrator@WL /d/workspace/config (master)
$ touch application.properties

修改兩個配置文件

application.properties如下
#env.host.db=172.20.62.86
env.host.db=127.0.0.1
env.host.mq=192.168.245.128
env.host.redis=192.168.245.128
#zookeeper
env.host.zookeeper=192.168.245.128
zookeeper.address=zookeeper://${env.host.zookeeper}:2181?timeout=20000

#=========================================================redis單機================================================
#########Redis 連接配置(spring.redis.host、spring.redis.port不同環境需要單獨配置)
##Redis數據庫索引(默認爲0)
#spring.redis.database=0
##Redis服務器地址
spring.redis.host=${env.host.redis}
##Redis服務器連接端口
spring.redis.port=6380


blog.properties如下
logging.config=classpath:logger/logback-boot.xml
server.port=9002

#默認就是error
server.error.path=/error

#日期json
spring.jackson.time-zone=GMT+8
spring.jackson.default-property-inclusion=non_null
spring.jackson.date-format=yyyy-MM-dd HH:mm:ss

server.session.timeout=3600

提交因此前一進提交過application.properties所以現在只提交blog.properties

Administrator@WL /d/workspace/config (master)
$ git add blog.properties


Administrator@WL /d/workspace/config (master)
$ git commit -m 'add properties'
[master 4b431a5] add properties
 1 file changed, 0 insertions(+), 0 deletions(-)
 create mode 100644 blog.properties

Administrator@WL /d/workspace/config (master)
$ git push
warning: push.default is unset; its implicit value is changing in
Git 2.0 from 'matching' to 'simple'. To squelch this message
and maintain the current behavior after the default changes, use:

  git config --global push.default matching

To squelch this message and adopt the new behavior now, use:

  git config --global push.default simple

See 'git help config' and search for 'push.default' for further information.
(the 'simple' mode was introduced in Git 1.7.11. Use the similar mode
'current' instead of 'simple' if you sometimes use older versions of Git)

Username for 'http://192.168.245.128:8000': git
Password for 'http://[email protected]:8000':
Counting objects: 4, done.
Delta compression using up to 6 threads.
Compressing objects: 100% (2/2), done.
Writing objects: 100% (3/3), 312 bytes | 0 bytes/s, done.
Total 3 (delta 0), reused 0 (delta 0)
To http://192.168.245.128:8000/config.git
   e5effec..4b431a5  master -> master

Administrator@WL /d/workspace/config (master)
$

新建config-service

spring-cloud-config-server服務器也是一個簡單的spring-boot web服務器

新建maven工程

<groupId>com.wl.config</groupId>
  <artifactId>config-service</artifactId>
  <version>1.0-SNAPSHOT</version>

  <name>config-service</name>

pom.xml(與其他spring-boot服務不同,需要依賴spring-cloud-config-server)

<?xml version="1.0" encoding="UTF-8"?>

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
  <modelVersion>4.0.0</modelVersion>

  <groupId>com.wl.config</groupId>
  <artifactId>config-service</artifactId>
  <version>1.0-SNAPSHOT</version>

  <name>config-service</name>

  <properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <daylife-version>1.0-SNAPSHOT</daylife-version>
    <MainClass>com.wl.config.Application</MainClass>

    <spring-boot-version>1.5.7.RELEASE</spring-boot-version>

    <spring-cloud-starter-config-version>1.2.2.RELEASE</spring-cloud-starter-config-version>

    <slf4j-api-version>1.7.5</slf4j-api-version>

    <!-- groovy -->
    <groovy-all-version>2.4.5</groovy-all-version>

    <!-- 測試 -->
    <junit.version>4.12</junit.version>
    <groovy-all-version>2.4.5</groovy-all-version>
    <spock-core-version>1.1-groovy-2.4</spock-core-version>
  </properties>

  <dependencies>

    <dependency>
      <groupId>com.wl.common</groupId>
      <artifactId>daylife-api</artifactId>
      <version>${daylife-version}</version>
    </dependency>


    <!-- spring boot -->
    <dependency>
      <groupId>org.springframework.boot</groupId>
      <artifactId>spring-boot-starter-web</artifactId>
      <version>${spring-boot-version}</version>
      <exclusions>
        <exclusion>
          <groupId>org.slf4j</groupId>
          <artifactId>slf4j-api</artifactId>
        </exclusion>
      </exclusions>
    </dependency>


    <!-- https://mvnrepository.com/artifact/org.springframework.cloud/spring-cloud-starter-config -->
    <!-- 依賴 spring-web -->
    <dependency>
      <groupId>org.springframework.cloud</groupId>
      <artifactId>spring-cloud-starter-config</artifactId>
      <version>${spring-cloud-starter-config-version}</version>
      <exclusions>
        <exclusion>
          <groupId>com.fasterxml.jackson.core</groupId>
          <artifactId>jackson-databind</artifactId>
        </exclusion>
        <exclusion>
          <groupId>org.springframework.boot</groupId>
          <artifactId>*</artifactId>
        </exclusion>
        <exclusion>
          <groupId>org.springframework</groupId>
          <artifactId>spring-web</artifactId>
        </exclusion>
        <exclusion>
          <groupId>com.fasterxml.jackson.core</groupId>
          <artifactId>jackson-annotations</artifactId>
        </exclusion>
      </exclusions>
    </dependency>

    <!-- https://mvnrepository.com/artifact/org.springframework.cloud/spring-cloud-config-server -->
    <dependency>
      <groupId>org.springframework.cloud</groupId>
      <artifactId>spring-cloud-config-server</artifactId>
      <version>${spring-cloud-starter-config-version}</version>
    </dependency>



    <!---日誌 -->
    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-api</artifactId>
      <version>${slf4j-api-version}</version>
    </dependency>



    <!-- https://mvnrepository.com/artifact/com.github.sgroschupf/zkclient -->
    <dependency>
      <groupId>com.github.sgroschupf</groupId>
      <artifactId>zkclient</artifactId>
      <version>0.1</version>

      <exclusions>
        <exclusion>
          <groupId>org.apache.zookeeper</groupId>
          <artifactId>zookeeper</artifactId>
        </exclusion>
        <exclusion>
          <groupId>log4j</groupId>
          <artifactId>log4j</artifactId>
        </exclusion>
      </exclusions>
    </dependency>

    <!-- groovy -->
    <!-- https://mvnrepository.com/artifact/org.codehaus.groovy/groovy-all -->
    <dependency>
      <groupId>org.codehaus.groovy</groupId>
      <artifactId>groovy-all</artifactId>
      <version>${groovy-all-version}</version>
    </dependency>

    <!-- 測試依賴  scope test   不會打進jar包 -->

    <!-- https://mvnrepository.com/artifact/junit/junit -->
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>${junit.version}</version>
      <scope>test</scope>
    </dependency>

    <!-- https://mvnrepository.com/artifact/org.spockframework/spock-core -->
    <dependency>
      <groupId>org.spockframework</groupId>
      <artifactId>spock-core</artifactId>
      <version>${spock-core-version}</version>
      <scope>test</scope>
    </dependency>

    <!-- https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-starter-test -->
    <dependency>
      <groupId>org.springframework.boot</groupId>
      <artifactId>spring-boot-starter-test</artifactId>
      <version>${spring-boot-version}</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.springframework.boot</groupId>
      <artifactId>spring-boot-autoconfigure</artifactId>
      <version>${spring-boot-version}</version>
    </dependency>
  </dependencies>

  <!-- Package as an executable jar -->
  <build>
    <plugins>
      <plugin>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-maven-plugin</artifactId>
        <version>${spring-boot-version}</version>
        <configuration>
          <mainClass>${MainClass}</mainClass>
          <layout>JAR</layout>
        </configuration>
        <!-- repackage  生成兩個 jar.original -->
        <executions>
          <execution>
            <goals>
              <goal>repackage</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <!-- 指定maven 打包java 版本 -->
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>3.1</version>
        <configuration>
          <source>1.8</source>
          <target>1.8</target>
        </configuration>
      </plugin>
    </plugins>
    <!-- maven  編譯打包resource 和 java 目錄下所有文件  maven默認資源路徑是resources -->
    <resources>
      <resource>
        <directory>src/main/resources</directory>
        <includes>
          <include>**/*.*</include>
          <include>*.*</include>
        </includes>
      </resource>
      <resource>
        <directory>src/main/java</directory>
        <includes>
          <include>**/*.*</include>
          <include>*.*</include>
        </includes>
      </resource>
    </resources>
  </build>

</project>

application.properties配置

server.port=8888
spring.cloud.config.server.git.uri=http://192.168.245.128:8000/config.git
spring.cloud.config.server.git.password=123456
spring.cloud.config.server.git.username=git

啓動類Application.java

package com.wl.config;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
import org.springframework.boot.autoconfigure.jdbc.DataSourceTransactionManagerAutoConfiguration;
import org.springframework.boot.autoconfigure.orm.jpa.HibernateJpaAutoConfiguration;
import org.springframework.cloud.config.server.EnableConfigServer;

/**
 * Created by wl on 2019/3/7.
 */
@SpringBootApplication(exclude = {
        DataSourceAutoConfiguration.class,
        DataSourceTransactionManagerAutoConfiguration.class,
        HibernateJpaAutoConfiguration.class             //不使用數據庫
},scanBasePackages = "com.wl")
@EnableConfigServer
public class Application {

    private static final Logger logger = LoggerFactory.getLogger(Application.class);

    public static void main(String[] args) {
        SpringApplication app = new SpringApplication(Application.class);
        app.setWebEnvironment(true);
        app.run(args);
        logger.info("application init success");
    }

}

注意與一般的spring-boot服務啓動類不同的時多了一個EnableConfigServer註解

啓動服務

"D:\Program Files\Java\jdk1.8.0_181\bin\java" -agentlib:jdwp=transport=dt_socket,address=127.0.0.1:58297,suspend=y,server=n -XX:TieredStopAtLevel=1 -noverify -Dspring.output.ansi.enabled=always -Dfile.encoding=UTF-8 -classpath "D:\Program Files\Java\jdk1.8.0_181\jre\lib\charsets.jar;D:\Program Files\Java\jdk1.8.0_181\jre\lib\deploy.jar;D:\Program Files\Java\jdk1.8.0_181\jre\lib\ext\access-bridge-64.jar;D:\Program Files\Java\jdk1.8.0_181\jre\lib\ext\cldrdata.jar;D:\Program Files\Java\jdk1.8.0_181\jre\lib\ext\dnsns.jar;D:\Program Files\Java\jdk1.8.0_181\jre\lib\ext\jaccess.jar;D:\Program Files\Java\jdk1.8.0_181\jre\lib\ext\jfxrt.jar;D:\Program Files\Java\jdk1.8.0_181\jre\lib\ext\localedata.jar;D:\Program Files\Java\jdk1.8.0_181\jre\lib\ext\nashorn.jar;D:\Program Files\Java\jdk1.8.0_181\jre\lib\ext\sunec.jar;D:\Program Files\Java\jdk1.8.0_181\jre\lib\ext\sunjce_provider.jar;D:\Program Files\Java\jdk1.8.0_181\jre\lib\ext\sunmscapi.jar;D:\Program Files\Java\jdk1.8.0_181\jre\lib\ext\sunpkcs11.jar;D:\Program Files\Java\jdk1.8.0_181\jre\lib\ext\zipfs.jar;D:\Program Files\Java\jdk1.8.0_181\jre\lib\javaws.jar;D:\Program Files\Java\jdk1.8.0_181\jre\lib\jce.jar;D:\Program Files\Java\jdk1.8.0_181\jre\lib\jfr.jar;D:\Program Files\Java\jdk1.8.0_181\jre\lib\jfxswt.jar;D:\Program Files\Java\jdk1.8.0_181\jre\lib\jsse.jar;D:\Program Files\Java\jdk1.8.0_181\jre\lib\management-agent.jar;D:\Program Files\Java\jdk1.8.0_181\jre\lib\plugin.jar;D:\Program Files\Java\jdk1.8.0_181\jre\lib\resources.jar;D:\Program Files\Java\jdk1.8.0_181\jre\lib\rt.jar;D:\workspace\wl\study\service\config-service\target\classes;D:\maven\repo\com\wl\common\daylife-api\1.0-SNAPSHOT\daylife-api-1.0-SNAPSHOT.jar;D:\maven\repo\org\springframework\boot\spring-boot-starter-web\1.5.7.RELEASE\spring-boot-starter-web-1.5.7.RELEASE.jar;D:\maven\repo\org\springframework\boot\spring-boot-starter\1.5.7.RELEASE\spring-boot-starter-1.5.7.RELEASE.jar;D:\maven\repo\org\springframework\boot\spring-boot-starter-logging\1.5.7.RELEASE\spring-boot-starter-logging-1.5.7.RELEASE.jar;D:\maven\repo\ch\qos\logback\logback-classic\1.1.11\logback-classic-1.1.11.jar;D:\maven\repo\ch\qos\logback\logback-core\1.1.11\logback-core-1.1.11.jar;D:\maven\repo\org\slf4j\jcl-over-slf4j\1.7.25\jcl-over-slf4j-1.7.25.jar;D:\maven\repo\org\slf4j\jul-to-slf4j\1.7.25\jul-to-slf4j-1.7.25.jar;D:\maven\repo\org\slf4j\log4j-over-slf4j\1.7.25\log4j-over-slf4j-1.7.25.jar;D:\maven\repo\org\springframework\boot\spring-boot-starter-tomcat\1.5.7.RELEASE\spring-boot-starter-tomcat-1.5.7.RELEASE.jar;D:\maven\repo\org\apache\tomcat\embed\tomcat-embed-core\8.5.20\tomcat-embed-core-8.5.20.jar;D:\maven\repo\org\apache\tomcat\embed\tomcat-embed-el\8.5.20\tomcat-embed-el-8.5.20.jar;D:\maven\repo\org\apache\tomcat\embed\tomcat-embed-websocket\8.5.20\tomcat-embed-websocket-8.5.20.jar;D:\maven\repo\org\hibernate\hibernate-validator\5.3.5.Final\hibernate-validator-5.3.5.Final.jar;D:\maven\repo\javax\validation\validation-api\1.1.0.Final\validation-api-1.1.0.Final.jar;D:\maven\repo\org\jboss\logging\jboss-logging\3.3.0.Final\jboss-logging-3.3.0.Final.jar;D:\maven\repo\com\fasterxml\classmate\1.3.1\classmate-1.3.1.jar;D:\maven\repo\com\fasterxml\jackson\core\jackson-databind\2.8.10\jackson-databind-2.8.10.jar;D:\maven\repo\com\fasterxml\jackson\core\jackson-annotations\2.8.0\jackson-annotations-2.8.0.jar;D:\maven\repo\com\fasterxml\jackson\core\jackson-core\2.8.10\jackson-core-2.8.10.jar;D:\maven\repo\org\springframework\spring-web\4.3.11.RELEASE\spring-web-4.3.11.RELEASE.jar;D:\maven\repo\org\springframework\spring-aop\4.3.11.RELEASE\spring-aop-4.3.11.RELEASE.jar;D:\maven\repo\org\springframework\spring-beans\4.3.11.RELEASE\spring-beans-4.3.11.RELEASE.jar;D:\maven\repo\org\springframework\spring-context\4.3.11.RELEASE\spring-context-4.3.11.RELEASE.jar;D:\maven\repo\org\springframework\spring-webmvc\4.3.11.RELEASE\spring-webmvc-4.3.11.RELEASE.jar;D:\maven\repo\org\springframework\spring-expression\4.3.11.RELEASE\spring-expression-4.3.11.RELEASE.jar;D:\maven\repo\org\springframework\cloud\spring-cloud-starter-config\1.2.2.RELEASE\spring-cloud-starter-config-1.2.2.RELEASE.jar;D:\maven\repo\org\springframework\cloud\spring-cloud-starter\1.1.5.RELEASE\spring-cloud-starter-1.1.5.RELEASE.jar;D:\maven\repo\org\springframework\cloud\spring-cloud-context\1.1.5.RELEASE\spring-cloud-context-1.1.5.RELEASE.jar;D:\maven\repo\org\springframework\cloud\spring-cloud-commons\1.1.5.RELEASE\spring-cloud-commons-1.1.5.RELEASE.jar;D:\maven\repo\org\springframework\cloud\spring-cloud-config-client\1.2.2.RELEASE\spring-cloud-config-client-1.2.2.RELEASE.jar;D:\maven\repo\org\springframework\cloud\spring-cloud-config-server\1.2.2.RELEASE\spring-cloud-config-server-1.2.2.RELEASE.jar;D:\maven\repo\org\springframework\boot\spring-boot-starter-actuator\1.4.1.RELEASE\spring-boot-starter-actuator-1.4.1.RELEASE.jar;D:\maven\repo\org\springframework\boot\spring-boot-actuator\1.4.1.RELEASE\spring-boot-actuator-1.4.1.RELEASE.jar;D:\maven\repo\org\springframework\security\spring-security-crypto\4.1.3.RELEASE\spring-security-crypto-4.1.3.RELEASE.jar;D:\maven\repo\org\springframework\security\spring-security-rsa\1.0.3.RELEASE\spring-security-rsa-1.0.3.RELEASE.jar;D:\maven\repo\org\bouncycastle\bcpkix-jdk15on\1.55\bcpkix-jdk15on-1.55.jar;D:\maven\repo\org\bouncycastle\bcprov-jdk15on\1.55\bcprov-jdk15on-1.55.jar;D:\maven\repo\org\eclipse\jgit\org.eclipse.jgit\3.5.3.201412180710-r\org.eclipse.jgit-3.5.3.201412180710-r.jar;D:\maven\repo\com\jcraft\jsch\0.1.50\jsch-0.1.50.jar;D:\maven\repo\com\googlecode\javaewah\JavaEWAH\0.7.9\JavaEWAH-0.7.9.jar;D:\maven\repo\org\apache\httpcomponents\httpclient\4.1.3\httpclient-4.1.3.jar;D:\maven\repo\org\apache\httpcomponents\httpcore\4.1.4\httpcore-4.1.4.jar;D:\maven\repo\commons-logging\commons-logging\1.1.1\commons-logging-1.1.1.jar;D:\maven\repo\commons-codec\commons-codec\1.4\commons-codec-1.4.jar;D:\maven\repo\org\yaml\snakeyaml\1.17\snakeyaml-1.17.jar;D:\maven\repo\org\slf4j\slf4j-api\1.7.5\slf4j-api-1.7.5.jar;D:\maven\repo\com\github\sgroschupf\zkclient\0.1\zkclient-0.1.jar;D:\maven\repo\org\codehaus\groovy\groovy-all\2.4.5\groovy-all-2.4.5.jar;D:\maven\repo\org\springframework\spring-core\4.3.11.RELEASE\spring-core-4.3.11.RELEASE.jar;D:\maven\repo\org\springframework\boot\spring-boot-autoconfigure\1.5.7.RELEASE\spring-boot-autoconfigure-1.5.7.RELEASE.jar;D:\maven\repo\org\springframework\boot\spring-boot\1.5.7.RELEASE\spring-boot-1.5.7.RELEASE.jar;D:\Program Files\JetBrains\IntelliJ IDEA 2017.1.6\lib\idea_rt.jar" com.wl.config.Application
Connected to the target VM, address: '127.0.0.1:58297', transport: 'socket'
2019-03-07 21:14:48.932  INFO 7412 --- [           main] s.c.a.AnnotationConfigApplicationContext : Refreshing org.springframework.context.annotation.AnnotationConfigApplicationContext@4659191b: startup date [Thu Mar 07 21:14:48 CST 2019]; root of context hierarchy
2019-03-07 21:14:49.103  INFO 7412 --- [           main] trationDelegate$BeanPostProcessorChecker : Bean 'configurationPropertiesRebinderAutoConfiguration' of type [org.springframework.cloud.autoconfigure.ConfigurationPropertiesRebinderAutoConfiguration$$EnhancerBySpringCGLIB$$e9029dd] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)

  .   ____          _            __ _ _
 /\\ / ___'_ __ _ _(_)_ __  __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
 \\/  ___)| |_)| | | | | || (_| |  ) ) ) )
  '  |____| .__|_| |_|_| |_\__, | / / / /
 =========|_|==============|___/=/_/_/_/
 :: Spring Boot ::        (v1.5.7.RELEASE)

2019-03-07 21:14:50.394  INFO 7412 --- [           main] com.wl.config.Application                : No active profile set, falling back to default profiles: default
2019-03-07 21:14:50.403  INFO 7412 --- [           main] ationConfigEmbeddedWebApplicationContext : Refreshing org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext@51745f40: startup date [Thu Mar 07 21:14:50 CST 2019]; parent: org.springframework.context.annotation.AnnotationConfigApplicationContext@4659191b
2019-03-07 21:14:50.840  INFO 7412 --- [           main] o.s.cloud.context.scope.GenericScope     : BeanFactory id=e1f07989-d2f0-3920-a2ef-4b2f8e4f29a1
2019-03-07 21:14:50.896  INFO 7412 --- [           main] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.cloud.autoconfigure.ConfigurationPropertiesRebinderAutoConfiguration' of type [org.springframework.cloud.autoconfigure.ConfigurationPropertiesRebinderAutoConfiguration$$EnhancerBySpringCGLIB$$e9029dd] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2019-03-07 21:14:51.153  INFO 7412 --- [           main] s.b.c.e.t.TomcatEmbeddedServletContainer : Tomcat initialized with port(s): 8888 (http)
2019-03-07 21:14:51.158  INFO 7412 --- [           main] o.apache.catalina.core.StandardService   : Starting service [Tomcat]
2019-03-07 21:14:51.159  INFO 7412 --- [           main] org.apache.catalina.core.StandardEngine  : Starting Servlet Engine: Apache Tomcat/8.5.20
2019-03-07 21:14:51.228  INFO 7412 --- [ost-startStop-1] o.a.c.c.C.[Tomcat].[localhost].[/]       : Initializing Spring embedded WebApplicationContext
2019-03-07 21:14:51.228  INFO 7412 --- [ost-startStop-1] o.s.web.context.ContextLoader            : Root WebApplicationContext: initialization completed in 825 ms
2019-03-07 21:14:51.390  INFO 7412 --- [ost-startStop-1] o.s.b.w.servlet.ServletRegistrationBean  : Mapping servlet: 'dispatcherServlet' to [/]
2019-03-07 21:14:51.393  INFO 7412 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean   : Mapping filter: 'metricsFilter' to: [/*]
2019-03-07 21:14:51.394  INFO 7412 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean   : Mapping filter: 'characterEncodingFilter' to: [/*]
2019-03-07 21:14:51.394  INFO 7412 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean   : Mapping filter: 'hiddenHttpMethodFilter' to: [/*]
2019-03-07 21:14:51.394  INFO 7412 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean   : Mapping filter: 'httpPutFormContentFilter' to: [/*]
2019-03-07 21:14:51.394  INFO 7412 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean   : Mapping filter: 'requestContextFilter' to: [/*]
2019-03-07 21:14:51.394  INFO 7412 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean   : Mapping filter: 'webRequestLoggingFilter' to: [/*]
2019-03-07 21:14:51.394  INFO 7412 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean   : Mapping filter: 'applicationContextIdFilter' to: [/*]
2019-03-07 21:14:51.646  INFO 7412 --- [           main] s.w.s.m.m.a.RequestMappingHandlerAdapter : Looking for @ControllerAdvice: org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext@51745f40: startup date [Thu Mar 07 21:14:50 CST 2019]; parent: org.springframework.context.annotation.AnnotationConfigApplicationContext@4659191b
2019-03-07 21:14:51.688  INFO 7412 --- [           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.BasicErrorController.error(javax.servlet.http.HttpServletRequest)
2019-03-07 21:14:51.689  INFO 7412 --- [           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.BasicErrorController.errorHtml(javax.servlet.http.HttpServletRequest,javax.servlet.http.HttpServletResponse)
2019-03-07 21:14:51.694  INFO 7412 --- [           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)
2019-03-07 21:14:51.694  INFO 7412 --- [           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)
2019-03-07 21:14:51.694  INFO 7412 --- [           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)
2019-03-07 21:14:51.694  INFO 7412 --- [           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)
2019-03-07 21:14:51.695  INFO 7412 --- [           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()
2019-03-07 21:14:51.695  INFO 7412 --- [           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()
2019-03-07 21:14:51.695  INFO 7412 --- [           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)
2019-03-07 21:14:51.699  INFO 7412 --- [           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
2019-03-07 21:14:51.699  INFO 7412 --- [           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
2019-03-07 21:14:51.700  INFO 7412 --- [           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)
2019-03-07 21:14:51.700  INFO 7412 --- [           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
2019-03-07 21:14:51.700  INFO 7412 --- [           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
2019-03-07 21:14:51.700  INFO 7412 --- [           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
2019-03-07 21:14:51.700  INFO 7412 --- [           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)
2019-03-07 21:14:51.701  INFO 7412 --- [           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
2019-03-07 21:14:51.702  INFO 7412 --- [           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.resolve(java.lang.String,java.lang.String,java.lang.String,javax.servlet.http.HttpServletRequest) throws java.io.IOException
2019-03-07 21:14:51.702  INFO 7412 --- [           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
2019-03-07 21:14:51.725  INFO 7412 --- [           main] o.s.w.s.handler.SimpleUrlHandlerMapping  : Mapped URL path [/webjars/**] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler]
2019-03-07 21:14:51.725  INFO 7412 --- [           main] o.s.w.s.handler.SimpleUrlHandlerMapping  : Mapped URL path [/**] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler]
2019-03-07 21:14:51.765  INFO 7412 --- [           main] o.s.w.s.handler.SimpleUrlHandlerMapping  : Mapped URL path [/**/favicon.ico] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler]
2019-03-07 21:14:52.052  WARN 7412 --- [           main] figurationPropertiesBindingPostProcessor : The @ConfigurationProperties bean class org.springframework.cloud.context.restart.RestartEndpoint contains validation constraints but had not been annotated with @Validated.
2019-03-07 21:14:52.053  WARN 7412 --- [           main] figurationPropertiesBindingPostProcessor : The @ConfigurationProperties bean class org.springframework.cloud.context.restart.RestartEndpoint contains validation constraints but had not been annotated with @Validated.
2019-03-07 21:14:52.053  WARN 7412 --- [           main] figurationPropertiesBindingPostProcessor : The @ConfigurationProperties bean class org.springframework.cloud.context.restart.RestartEndpoint contains validation constraints but had not been annotated with @Validated.
2019-03-07 21:14:52.085  WARN 7412 --- [           main] figurationPropertiesBindingPostProcessor : The @ConfigurationProperties bean class org.springframework.cloud.endpoint.RefreshEndpoint contains validation constraints but had not been annotated with @Validated.
2019-03-07 21:14:52.085  WARN 7412 --- [           main] figurationPropertiesBindingPostProcessor : The @ConfigurationProperties bean class org.springframework.cloud.endpoint.RefreshEndpoint contains validation constraints but had not been annotated with @Validated.
2019-03-07 21:14:52.085  WARN 7412 --- [           main] figurationPropertiesBindingPostProcessor : The @ConfigurationProperties bean class org.springframework.cloud.endpoint.RefreshEndpoint contains validation constraints but had not been annotated with @Validated.
2019-03-07 21:14:52.095  WARN 7412 --- [           main] figurationPropertiesBindingPostProcessor : The @ConfigurationProperties bean class org.springframework.cloud.context.restart.RestartEndpoint$PauseEndpoint contains validation constraints but had not been annotated with @Validated.
2019-03-07 21:14:52.095  WARN 7412 --- [           main] figurationPropertiesBindingPostProcessor : The @ConfigurationProperties bean class org.springframework.cloud.context.restart.RestartEndpoint$PauseEndpoint contains validation constraints but had not been annotated with @Validated.
2019-03-07 21:14:52.095  WARN 7412 --- [           main] figurationPropertiesBindingPostProcessor : The @ConfigurationProperties bean class org.springframework.cloud.context.restart.RestartEndpoint$PauseEndpoint contains validation constraints but had not been annotated with @Validated.
2019-03-07 21:14:52.100  WARN 7412 --- [           main] figurationPropertiesBindingPostProcessor : The @ConfigurationProperties bean class org.springframework.cloud.context.restart.RestartEndpoint$ResumeEndpoint contains validation constraints but had not been annotated with @Validated.
2019-03-07 21:14:52.100  WARN 7412 --- [           main] figurationPropertiesBindingPostProcessor : The @ConfigurationProperties bean class org.springframework.cloud.context.restart.RestartEndpoint$ResumeEndpoint contains validation constraints but had not been annotated with @Validated.
2019-03-07 21:14:52.100  WARN 7412 --- [           main] figurationPropertiesBindingPostProcessor : The @ConfigurationProperties bean class org.springframework.cloud.context.restart.RestartEndpoint$ResumeEndpoint contains validation constraints but had not been annotated with @Validated.
2019-03-07 21:14:52.111  INFO 7412 --- [           main] o.s.b.a.e.mvc.EndpointHandlerMapping     : Mapped "{[/autoconfig || /autoconfig.json],methods=[GET],produces=[application/json]}" onto public java.lang.Object org.springframework.boot.actuate.endpoint.mvc.EndpointMvcAdapter.invoke()
2019-03-07 21:14:52.111  INFO 7412 --- [           main] o.s.b.a.e.mvc.EndpointHandlerMapping     : Mapped "{[/trace || /trace.json],methods=[GET],produces=[application/json]}" onto public java.lang.Object org.springframework.boot.actuate.endpoint.mvc.EndpointMvcAdapter.invoke()
2019-03-07 21:14:52.111  INFO 7412 --- [           main] o.s.b.a.e.mvc.EndpointHandlerMapping     : Mapped "{[/restart || /restart.json],methods=[POST]}" onto public java.lang.Object org.springframework.cloud.context.restart.RestartMvcEndpoint.invoke()
2019-03-07 21:14:52.112  INFO 7412 --- [           main] o.s.b.a.e.mvc.EndpointHandlerMapping     : Mapped "{[/mappings || /mappings.json],methods=[GET],produces=[application/json]}" onto public java.lang.Object org.springframework.boot.actuate.endpoint.mvc.EndpointMvcAdapter.invoke()
2019-03-07 21:14:52.112  INFO 7412 --- [           main] o.s.b.a.e.mvc.EndpointHandlerMapping     : Mapped "{[/dump || /dump.json],methods=[GET],produces=[application/json]}" onto public java.lang.Object org.springframework.boot.actuate.endpoint.mvc.EndpointMvcAdapter.invoke()
2019-03-07 21:14:52.112  INFO 7412 --- [           main] o.s.b.a.e.mvc.EndpointHandlerMapping     : Mapped "{[/refresh || /refresh.json],methods=[POST]}" onto public java.lang.Object org.springframework.cloud.endpoint.GenericPostableMvcEndpoint.invoke()
2019-03-07 21:14:52.113  INFO 7412 --- [           main] o.s.b.a.e.mvc.EndpointHandlerMapping     : Mapped "{[/beans || /beans.json],methods=[GET],produces=[application/json]}" onto public java.lang.Object org.springframework.boot.actuate.endpoint.mvc.EndpointMvcAdapter.invoke()
2019-03-07 21:14:52.113  INFO 7412 --- [           main] o.s.b.a.e.mvc.EndpointHandlerMapping     : Mapped "{[/health || /health.json],produces=[application/json]}" onto public java.lang.Object org.springframework.boot.actuate.endpoint.mvc.HealthMvcEndpoint.invoke(java.security.Principal)
2019-03-07 21:14:52.114  INFO 7412 --- [           main] o.s.b.a.e.mvc.EndpointHandlerMapping     : Mapped "{[/env/{name:.*}],methods=[GET],produces=[application/json]}" onto public java.lang.Object org.springframework.boot.actuate.endpoint.mvc.EnvironmentMvcEndpoint.value(java.lang.String)
2019-03-07 21:14:52.114  INFO 7412 --- [           main] o.s.b.a.e.mvc.EndpointHandlerMapping     : Mapped "{[/env || /env.json],methods=[GET],produces=[application/json]}" onto public java.lang.Object org.springframework.boot.actuate.endpoint.mvc.EndpointMvcAdapter.invoke()
2019-03-07 21:14:52.114  INFO 7412 --- [           main] o.s.b.a.e.mvc.EndpointHandlerMapping     : Mapped "{[/pause || /pause.json],methods=[POST]}" onto public java.lang.Object org.springframework.cloud.endpoint.GenericPostableMvcEndpoint.invoke()
2019-03-07 21:14:52.115  INFO 7412 --- [           main] o.s.b.a.e.mvc.EndpointHandlerMapping     : Mapped "{[/heapdump || /heapdump.json],methods=[GET],produces=[application/octet-stream]}" onto public void org.springframework.boot.actuate.endpoint.mvc.HeapdumpMvcEndpoint.invoke(boolean,javax.servlet.http.HttpServletRequest,javax.servlet.http.HttpServletResponse) throws java.io.IOException,javax.servlet.ServletException
2019-03-07 21:14:52.117  INFO 7412 --- [           main] o.s.b.a.e.mvc.EndpointHandlerMapping     : Mapped "{[/metrics/{name:.*}],methods=[GET],produces=[application/json]}" onto public java.lang.Object org.springframework.boot.actuate.endpoint.mvc.MetricsMvcEndpoint.value(java.lang.String)
2019-03-07 21:14:52.117  INFO 7412 --- [           main] o.s.b.a.e.mvc.EndpointHandlerMapping     : Mapped "{[/metrics || /metrics.json],methods=[GET],produces=[application/json]}" onto public java.lang.Object org.springframework.boot.actuate.endpoint.mvc.EndpointMvcAdapter.invoke()
2019-03-07 21:14:52.118  INFO 7412 --- [           main] o.s.b.a.e.mvc.EndpointHandlerMapping     : Mapped "{[/configprops || /configprops.json],methods=[GET],produces=[application/json]}" onto public java.lang.Object org.springframework.boot.actuate.endpoint.mvc.EndpointMvcAdapter.invoke()
2019-03-07 21:14:52.118  INFO 7412 --- [           main] o.s.b.a.e.mvc.EndpointHandlerMapping     : Mapped "{[/env],methods=[POST]}" onto public java.lang.Object org.springframework.cloud.context.environment.EnvironmentManagerMvcEndpoint.value(java.util.Map<java.lang.String, java.lang.String>)
2019-03-07 21:14:52.118  INFO 7412 --- [           main] o.s.b.a.e.mvc.EndpointHandlerMapping     : Mapped "{[/env/reset],methods=[POST]}" onto public java.util.Map<java.lang.String, java.lang.Object> org.springframework.cloud.context.environment.EnvironmentManagerMvcEndpoint.reset()
2019-03-07 21:14:52.118  INFO 7412 --- [           main] o.s.b.a.e.mvc.EndpointHandlerMapping     : Mapped "{[/info || /info.json],methods=[GET],produces=[application/json]}" onto public java.lang.Object org.springframework.boot.actuate.endpoint.mvc.EndpointMvcAdapter.invoke()
2019-03-07 21:14:52.119  INFO 7412 --- [           main] o.s.b.a.e.mvc.EndpointHandlerMapping     : Mapped "{[/resume || /resume.json],methods=[POST]}" onto public java.lang.Object org.springframework.cloud.endpoint.GenericPostableMvcEndpoint.invoke()
2019-03-07 21:14:52.426  INFO 7412 --- [           main] o.s.j.e.a.AnnotationMBeanExporter        : Registering beans for JMX exposure on startup
2019-03-07 21:14:52.434  INFO 7412 --- [           main] o.s.j.e.a.AnnotationMBeanExporter        : Bean with name 'configurationPropertiesRebinder' has been autodetected for JMX exposure
2019-03-07 21:14:52.434  INFO 7412 --- [           main] o.s.j.e.a.AnnotationMBeanExporter        : Bean with name 'refreshEndpoint' has been autodetected for JMX exposure
2019-03-07 21:14:52.434  INFO 7412 --- [           main] o.s.j.e.a.AnnotationMBeanExporter        : Bean with name 'restartEndpoint' has been autodetected for JMX exposure
2019-03-07 21:14:52.434  INFO 7412 --- [           main] o.s.j.e.a.AnnotationMBeanExporter        : Bean with name 'refreshScope' has been autodetected for JMX exposure
2019-03-07 21:14:52.435  INFO 7412 --- [           main] o.s.j.e.a.AnnotationMBeanExporter        : Bean with name 'environmentManager' has been autodetected for JMX exposure
2019-03-07 21:14:52.436  INFO 7412 --- [           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]
2019-03-07 21:14:52.444  INFO 7412 --- [           main] o.s.j.e.a.AnnotationMBeanExporter        : Located managed bean 'restartEndpoint': registering with JMX server as MBean [org.springframework.cloud.context.restart:name=restartEndpoint,type=RestartEndpoint]
2019-03-07 21:14:52.452  INFO 7412 --- [           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]
2019-03-07 21:14:52.459  INFO 7412 --- [           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=51745f40,type=ConfigurationPropertiesRebinder]
2019-03-07 21:14:52.463  INFO 7412 --- [           main] o.s.j.e.a.AnnotationMBeanExporter        : Located managed bean 'refreshEndpoint': registering with JMX server as MBean [org.springframework.cloud.endpoint:name=refreshEndpoint,type=RefreshEndpoint]
2019-03-07 21:14:52.479  WARN 7412 --- [           main] figurationPropertiesBindingPostProcessor : The @ConfigurationProperties bean class org.springframework.cloud.context.restart.RestartEndpoint$ResumeEndpoint contains validation constraints but had not been annotated with @Validated.
2019-03-07 21:14:52.479  WARN 7412 --- [           main] figurationPropertiesBindingPostProcessor : The @ConfigurationProperties bean class org.springframework.cloud.context.restart.RestartEndpoint$ResumeEndpoint contains validation constraints but had not been annotated with @Validated.
2019-03-07 21:14:52.479  WARN 7412 --- [           main] figurationPropertiesBindingPostProcessor : The @ConfigurationProperties bean class org.springframework.cloud.context.restart.RestartEndpoint$ResumeEndpoint contains validation constraints but had not been annotated with @Validated.
2019-03-07 21:14:52.480  WARN 7412 --- [           main] figurationPropertiesBindingPostProcessor : The @ConfigurationProperties bean class org.springframework.cloud.context.restart.RestartEndpoint$ResumeEndpoint contains validation constraints but had not been annotated with @Validated.
2019-03-07 21:14:52.480  WARN 7412 --- [           main] figurationPropertiesBindingPostProcessor : The @ConfigurationProperties bean class org.springframework.cloud.context.restart.RestartEndpoint$ResumeEndpoint contains validation constraints but had not been annotated with @Validated.
2019-03-07 21:14:52.480  WARN 7412 --- [           main] figurationPropertiesBindingPostProcessor : The @ConfigurationProperties bean class org.springframework.cloud.context.restart.RestartEndpoint$ResumeEndpoint contains validation constraints but had not been annotated with @Validated.
2019-03-07 21:14:52.485  WARN 7412 --- [           main] figurationPropertiesBindingPostProcessor : The @ConfigurationProperties bean class org.springframework.cloud.context.restart.RestartEndpoint contains validation constraints but had not been annotated with @Validated.
2019-03-07 21:14:52.486  WARN 7412 --- [           main] figurationPropertiesBindingPostProcessor : The @ConfigurationProperties bean class org.springframework.cloud.context.restart.RestartEndpoint contains validation constraints but had not been annotated with @Validated.
2019-03-07 21:14:52.486  WARN 7412 --- [           main] figurationPropertiesBindingPostProcessor : The @ConfigurationProperties bean class org.springframework.cloud.context.restart.RestartEndpoint contains validation constraints but had not been annotated with @Validated.
2019-03-07 21:14:52.487  WARN 7412 --- [           main] figurationPropertiesBindingPostProcessor : The @ConfigurationProperties bean class org.springframework.cloud.context.restart.RestartEndpoint contains validation constraints but had not been annotated with @Validated.
2019-03-07 21:14:52.487  WARN 7412 --- [           main] figurationPropertiesBindingPostProcessor : The @ConfigurationProperties bean class org.springframework.cloud.context.restart.RestartEndpoint contains validation constraints but had not been annotated with @Validated.
2019-03-07 21:14:52.487  WARN 7412 --- [           main] figurationPropertiesBindingPostProcessor : The @ConfigurationProperties bean class org.springframework.cloud.context.restart.RestartEndpoint contains validation constraints but had not been annotated with @Validated.
2019-03-07 21:14:52.518  WARN 7412 --- [           main] figurationPropertiesBindingPostProcessor : The @ConfigurationProperties bean class org.springframework.cloud.context.restart.RestartEndpoint$PauseEndpoint contains validation constraints but had not been annotated with @Validated.
2019-03-07 21:14:52.518  WARN 7412 --- [           main] figurationPropertiesBindingPostProcessor : The @ConfigurationProperties bean class org.springframework.cloud.context.restart.RestartEndpoint$PauseEndpoint contains validation constraints but had not been annotated with @Validated.
2019-03-07 21:14:52.518  WARN 7412 --- [           main] figurationPropertiesBindingPostProcessor : The @ConfigurationProperties bean class org.springframework.cloud.context.restart.RestartEndpoint$PauseEndpoint contains validation constraints but had not been annotated with @Validated.
2019-03-07 21:14:52.519  WARN 7412 --- [           main] figurationPropertiesBindingPostProcessor : The @ConfigurationProperties bean class org.springframework.cloud.context.restart.RestartEndpoint$PauseEndpoint contains validation constraints but had not been annotated with @Validated.
2019-03-07 21:14:52.519  WARN 7412 --- [           main] figurationPropertiesBindingPostProcessor : The @ConfigurationProperties bean class org.springframework.cloud.context.restart.RestartEndpoint$PauseEndpoint contains validation constraints but had not been annotated with @Validated.
2019-03-07 21:14:52.519  WARN 7412 --- [           main] figurationPropertiesBindingPostProcessor : The @ConfigurationProperties bean class org.springframework.cloud.context.restart.RestartEndpoint$PauseEndpoint contains validation constraints but had not been annotated with @Validated.
2019-03-07 21:14:52.525  WARN 7412 --- [           main] figurationPropertiesBindingPostProcessor : The @ConfigurationProperties bean class org.springframework.cloud.endpoint.RefreshEndpoint contains validation constraints but had not been annotated with @Validated.
2019-03-07 21:14:52.525  WARN 7412 --- [           main] figurationPropertiesBindingPostProcessor : The @ConfigurationProperties bean class org.springframework.cloud.endpoint.RefreshEndpoint contains validation constraints but had not been annotated with @Validated.
2019-03-07 21:14:52.525  WARN 7412 --- [           main] figurationPropertiesBindingPostProcessor : The @ConfigurationProperties bean class org.springframework.cloud.endpoint.RefreshEndpoint contains validation constraints but had not been annotated with @Validated.
2019-03-07 21:14:52.525  WARN 7412 --- [           main] figurationPropertiesBindingPostProcessor : The @ConfigurationProperties bean class org.springframework.cloud.endpoint.RefreshEndpoint contains validation constraints but had not been annotated with @Validated.
2019-03-07 21:14:52.525  WARN 7412 --- [           main] figurationPropertiesBindingPostProcessor : The @ConfigurationProperties bean class org.springframework.cloud.endpoint.RefreshEndpoint contains validation constraints but had not been annotated with @Validated.
2019-03-07 21:14:52.525  WARN 7412 --- [           main] figurationPropertiesBindingPostProcessor : The @ConfigurationProperties bean class org.springframework.cloud.endpoint.RefreshEndpoint contains validation constraints but had not been annotated with @Validated.
2019-03-07 21:14:52.544  INFO 7412 --- [           main] o.s.c.support.DefaultLifecycleProcessor  : Starting beans in phase 0
2019-03-07 21:14:52.659  INFO 7412 --- [           main] s.b.c.e.t.TomcatEmbeddedServletContainer : Tomcat started on port(s): 8888 (http)
2019-03-07 21:14:52.662  INFO 7412 --- [           main] com.wl.config.Application                : Started Application in 5.18 seconds (JVM running for 5.453)
2019-03-07 21:14:52.662  INFO 7412 --- [           main] com.wl.config.Application                : application init success

在瀏覽器地址框輸入http://localhost:8888/blog/master/

結果如下

在其他spring-boot服務中在resources資源目錄下新建bootstrap.properties文件

配置

spring.application.name=blog
spring.cloud.config.uri=http://localhost:8888

就可以加載config中的配置文件了(spring-boot服務中要加spring-cloud-starter-config依賴)

參考https://springcloud.cc/spring-cloud-config.html

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章