• springcloud-Feign 声明式 REST 调用


    • Feign 基础
    • 将前面的例子用 Feign 改写,让其达到与 Ribbon + RestTemplate 相同的效果。
    • 如果系统业务非常复杂,而你是一个新人,当你看到这行代码,恐怕很难一眼看出其用途是什么。
    • 这个例子构造的 URL 非常简单,但如果你需要构造类似如下这么丑陋的 URL 时,比如:https://www.baidu.com/s?wd=asf&rsv_spt=1&rsv_iqid=0xa25bbeba000047fd&,恐怕就有心无力了。尽管 RestTemplate 支持使用占位符,从而让我们避免字符串拼接的尴尬境地,但构造这么复杂的 URL 依然是很麻烦的。更可怕的是,互联网时代需求变化非常之快,你的参数可能会从 10 个变成 12 个、15 个,再后来又精简成 13 个……维护这个 URL 真的是想想都累……

    Feign 是 Netflix 开发的声明式、模板化的 HTTP 客户端,其灵感来自 Retrofit、JAXRS-2.0 以及 WebSocket。Feign 可帮助我们更加便捷、优雅地调用 HTTP API。

    在 Spring Cloud 中,使用 Feign 非常简单——只需创建接口,并在接口上添加注解即可。

    Feign 支持多种注解,例如 Feign 自带的注解或者 JAX-RS 注解等。Spring Cloud 对 Feign 进行了增强,使其支持 Spring MVC 注解,另外还整合了 Ribbon 和 Eureka,从而使得 Feign 的使用更加方便。

     pom.xml

    添加

     <dependency>
                <groupId>org.springframework.cloud</groupId>
                <artifactId>spring-cloud-starter-openfeign</artifactId>
            </dependency>
    

      

    <?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.lzj1234</groupId>
        <artifactId>microservice-consumer-movie-feign</artifactId>
        <version>1.0-SNAPSHOT</version>
        <parent>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-parent</artifactId>
            <version>2.0.7.RELEASE</version>
            <relativePath/>
        </parent>
        <properties>
            <java.version>1.8</java.version>
            <!--        <maven.compiler.source>8</maven.compiler.source>-->
            <!--        <maven.compiler.target>8</maven.compiler.target>-->
        </properties>
        <dependencies>
            <!-- https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-starter-data-jpa -->
            <dependency>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-starter-data-jpa</artifactId>
            </dependency>
    
            <!-- https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-starter-web -->
            <dependency>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-starter-web</artifactId>
                <!--            <version>2.4.2</version>-->
            </dependency>
    
            <!-- 引入H2数据库,一种内嵌的数据库,语法类似MySQL -->
            <!-- https://mvnrepository.com/artifact/com.h2database/h2 -->
            <dependency>
                <groupId>com.h2database</groupId>
                <artifactId>h2</artifactId>
                <version>1.4.200</version>
                <!--            <scope>test</scope>-->
            </dependency>
    
            <!-- https://mvnrepository.com/artifact/org.projectlombok/lombok -->
            <dependency>
                <groupId>org.projectlombok</groupId>
                <artifactId>lombok</artifactId>
                <version>1.18.18</version>
                <scope>provided</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>2.4.2</version>-->
                <scope>test</scope>
            </dependency>
            <!-- https://mvnrepository.com/artifact/org.apache.maven.plugins/maven-clean-plugin -->
            <dependency>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-clean-plugin</artifactId>
                <version>2.5</version>
            </dependency>
            <dependency>
                <groupId>org.springframework.cloud</groupId>
                <artifactId>spring-cloud-starter-openfeign</artifactId>
            </dependency>
            <!-- 新增依赖 -->
            <dependency>
                <groupId>org.springframework.cloud</groupId>
                <artifactId>spring-cloud-starter-netflix-eureka-client</artifactId>
            </dependency>
        </dependencies>
    
        <!-- 引入spring cloud的依赖,不能少,主要用来管理Spring Cloud生态各组件的版本 -->
        <dependencyManagement>
            <dependencies>
                <dependency>
                    <groupId>org.springframework.cloud</groupId>
                    <artifactId>spring-cloud-dependencies</artifactId>
                    <version>Finchley.SR2</version>
                    <type>pom</type>
                    <scope>import</scope>
                </dependency>
            </dependencies>
        </dependencyManagement>
    
        <build>
            <plugins>
                <plugin>
                    <groupId>org.springframework.boot</groupId>
                    <artifactId>spring-boot-maven-plugin</artifactId>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-compiler-plugin</artifactId>
                    <version>2.5.1</version>
                    <configuration>
                        <source>1.8</source>
                        <target>1.8</target>
                    </configuration>
                </plugin>
            </plugins>
        </build>
    
    </project>
    

      app.java

    启动类添加

    @EnableFeignClients

    package com.lzj1234;
    
    import org.springframework.boot.SpringApplication;
    import org.springframework.boot.autoconfigure.SpringBootApplication;
    import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
    import org.springframework.cloud.openfeign.EnableFeignClients;
    
    @SpringBootApplication
    @EnableDiscoveryClient
    @EnableFeignClients
    public class App {
        public static void main(String[] args) {
            SpringApplication.run(App.class,args);
        }
    }
    

      

    User

    package com.lzj1234;
    
    
    import lombok.AllArgsConstructor;
    import lombok.Data;
    import lombok.NoArgsConstructor;
    
    import java.math.BigDecimal;
    
    @Data
    @AllArgsConstructor
    @NoArgsConstructor
    public class User {
        private Long id;
        private String username;
        private String name;
        private Integer age;
        private BigDecimal balance;
    }
    

      

    UserFeignClient

    package com.lzj1234;
    
    
    import org.springframework.cloud.openfeign.FeignClient;
    import org.springframework.web.bind.annotation.GetMapping;
    import org.springframework.web.bind.annotation.PathVariable;
    
    @FeignClient(name = "microservice-provider-user")
    public interface UserFeignClient {
    
        @GetMapping("/users/{id}")
        User findById(@PathVariable("id") Long id);
    }
    

      这样一个 Feign Client 就写完啦!其中,@FeignClient 注解中的 microservice-provider-user 是想要请求服务的名称,这是用来创建 Ribbon Client 的(Feign 整合了 Ribbon)。在本例中,由于使用了 Eureka,所以 Ribbon 会把 microservice-provider-user 解析成 Eureka Server 中的服务。除此之外,还可使用 url 属性指定请求的 URL(URL 可以是完整的 URL 或主机名),例如 @FeignClient(name = "abcde", url = "http://localhost:8000/")。此外,name 可以是任意值,但不可省略,否则应用将无法启动!

    MovieController

    package com.lzj1234;
    
    
    import org.springframework.beans.factory.annotation.Autowired;
    import org.springframework.web.bind.annotation.GetMapping;
    import org.springframework.web.bind.annotation.PathVariable;
    import org.springframework.web.bind.annotation.RequestMapping;
    import org.springframework.web.bind.annotation.RestController;
    
    @RequestMapping("/movies")
    @RestController
    public class MovieController {
    
        @Autowired
        private UserFeignClient userFeignClient;
    
        @GetMapping("/users/{id}")
        public User findById(@PathVariable Long id){
            return this.userFeignClient.findById(id);
        }
    }
    

      application.yml

    server:
      port: 8011
    spring:
      application:
        name: microservice-consumer-movie-feign
    logging:
      level:
        root: INFO
        # 配置日志级别,让hibernate打印出执行的SQL参数
        org.hibernate: INFO
        org.hibernate.type.descriptor.sql.BasicBinder: TRACE
        org.hibernate.type.descriptor.sql.BasicExtractor: TRACE
    
    # 新增配置
    eureka:
      client:
        serviceUrl:
          defaultZone: http://localhost:8080/eureka/
      instance:
        prefer-ip-address: true
    

      mvn spring-boot:run 

    D:kaifajavajdkinjava.exe -XX:TieredStopAtLevel=1 -noverify -Dspring.output.ansi.enabled=always "-javaagent:E:kaifajavaIntelliJ IDEA 2020.3libidea_rt.jar=9208:E:kaifajavaIntelliJ IDEA 2020.3in" -Dcom.sun.management.jmxremote -Dspring.jmx.enabled=true -Dspring.liveBeansView.mbeanDomain -Dspring.application.admin.enabled=true -Dfile.encoding=UTF-8 -classpath D:kaifajavajdkjrelibcharsets.jar;D:kaifajavajdkjrelibdeploy.jar;D:kaifajavajdkjrelibextaccess-bridge-64.jar;D:kaifajavajdkjrelibextcldrdata.jar;D:kaifajavajdkjrelibextdnsns.jar;D:kaifajavajdkjrelibextjaccess.jar;D:kaifajavajdkjrelibextjfxrt.jar;D:kaifajavajdkjrelibextlocaledata.jar;D:kaifajavajdkjrelibext
    ashorn.jar;D:kaifajavajdkjrelibextsunec.jar;D:kaifajavajdkjrelibextsunjce_provider.jar;D:kaifajavajdkjrelibextsunmscapi.jar;D:kaifajavajdkjrelibextsunpkcs11.jar;D:kaifajavajdkjrelibextzipfs.jar;D:kaifajavajdkjrelibjavaws.jar;D:kaifajavajdkjrelibjce.jar;D:kaifajavajdkjrelibjfr.jar;D:kaifajavajdkjrelibjfxswt.jar;D:kaifajavajdkjrelibjsse.jar;D:kaifajavajdkjrelibmanagement-agent.jar;D:kaifajavajdkjrelibplugin.jar;D:kaifajavajdkjrelib
    esources.jar;D:kaifajavajdkjrelib
    t.jar;C:Usersljavademomicroservice-consumer-movie-feign	argetclasses;D:kaifa
    eposmavenorgspringframeworkootspring-boot-starter-data-jpa2.0.7.RELEASEspring-boot-starter-data-jpa-2.0.7.RELEASE.jar;D:kaifa
    eposmavenorgspringframeworkootspring-boot-starter2.0.7.RELEASEspring-boot-starter-2.0.7.RELEASE.jar;D:kaifa
    eposmavenorgspringframeworkootspring-boot2.0.7.RELEASEspring-boot-2.0.7.RELEASE.jar;D:kaifa
    eposmavenorgspringframeworkootspring-boot-autoconfigure2.0.7.RELEASEspring-boot-autoconfigure-2.0.7.RELEASE.jar;D:kaifa
    eposmavenorgspringframeworkootspring-boot-starter-logging2.0.7.RELEASEspring-boot-starter-logging-2.0.7.RELEASE.jar;D:kaifa
    eposmavenchqoslogbacklogback-classic1.2.3logback-classic-1.2.3.jar;D:kaifa
    eposmavenchqoslogbacklogback-core1.2.3logback-core-1.2.3.jar;D:kaifa
    eposmavenorgapachelogginglog4jlog4j-to-slf4j2.10.0log4j-to-slf4j-2.10.0.jar;D:kaifa
    eposmavenorgapachelogginglog4jlog4j-api2.10.0log4j-api-2.10.0.jar;D:kaifa
    eposmavenorgslf4jjul-to-slf4j1.7.25jul-to-slf4j-1.7.25.jar;D:kaifa
    eposmavenjavaxannotationjavax.annotation-api1.3.2javax.annotation-api-1.3.2.jar;D:kaifa
    eposmavenorgyamlsnakeyaml1.19snakeyaml-1.19.jar;D:kaifa
    eposmavenorgspringframeworkootspring-boot-starter-aop2.0.7.RELEASEspring-boot-starter-aop-2.0.7.RELEASE.jar;D:kaifa
    eposmavenorgspringframeworkspring-aop5.0.11.RELEASEspring-aop-5.0.11.RELEASE.jar;D:kaifa
    eposmavenorgaspectjaspectjweaver1.8.13aspectjweaver-1.8.13.jar;D:kaifa
    eposmavenorgspringframeworkootspring-boot-starter-jdbc2.0.7.RELEASEspring-boot-starter-jdbc-2.0.7.RELEASE.jar;D:kaifa
    eposmavencomzaxxerHikariCP2.7.9HikariCP-2.7.9.jar;D:kaifa
    eposmavenorgspringframeworkspring-jdbc5.0.11.RELEASEspring-jdbc-5.0.11.RELEASE.jar;D:kaifa
    eposmavenjavax	ransactionjavax.transaction-api1.2javax.transaction-api-1.2.jar;D:kaifa
    eposmavenorghibernatehibernate-core5.2.17.Finalhibernate-core-5.2.17.Final.jar;D:kaifa
    eposmavenorgjbossloggingjboss-logging3.3.2.Finaljboss-logging-3.3.2.Final.jar;D:kaifa
    eposmavenorghibernatejavaxpersistencehibernate-jpa-2.1-api1.0.2.Finalhibernate-jpa-2.1-api-1.0.2.Final.jar;D:kaifa
    eposmavenorgjavassistjavassist3.22.0-GAjavassist-3.22.0-GA.jar;D:kaifa
    eposmavenantlrantlr2.7.7antlr-2.7.7.jar;D:kaifa
    eposmavenorgjbossjandex2.0.3.Finaljandex-2.0.3.Final.jar;D:kaifa
    eposmavencomfasterxmlclassmate1.3.4classmate-1.3.4.jar;D:kaifa
    eposmavendom4jdom4j1.6.1dom4j-1.6.1.jar;D:kaifa
    eposmavenorghibernatecommonhibernate-commons-annotations5.0.1.Finalhibernate-commons-annotations-5.0.1.Final.jar;D:kaifa
    eposmavenorgspringframeworkdataspring-data-jpa2.0.12.RELEASEspring-data-jpa-2.0.12.RELEASE.jar;D:kaifa
    eposmavenorgspringframeworkdataspring-data-commons2.0.12.RELEASEspring-data-commons-2.0.12.RELEASE.jar;D:kaifa
    eposmavenorgspringframeworkspring-orm5.0.11.RELEASEspring-orm-5.0.11.RELEASE.jar;D:kaifa
    eposmavenorgspringframeworkspring-context5.0.11.RELEASEspring-context-5.0.11.RELEASE.jar;D:kaifa
    eposmavenorgspringframeworkspring-tx5.0.11.RELEASEspring-tx-5.0.11.RELEASE.jar;D:kaifa
    eposmavenorgspringframeworkspring-beans5.0.11.RELEASEspring-beans-5.0.11.RELEASE.jar;D:kaifa
    eposmavenorgslf4jslf4j-api1.7.25slf4j-api-1.7.25.jar;D:kaifa
    eposmavenorgspringframeworkspring-aspects5.0.11.RELEASEspring-aspects-5.0.11.RELEASE.jar;D:kaifa
    eposmavenorgspringframeworkootspring-boot-starter-web2.0.7.RELEASEspring-boot-starter-web-2.0.7.RELEASE.jar;D:kaifa
    eposmavenorgspringframeworkootspring-boot-starter-json2.0.7.RELEASEspring-boot-starter-json-2.0.7.RELEASE.jar;D:kaifa
    eposmavencomfasterxmljacksoncorejackson-databind2.9.7jackson-databind-2.9.7.jar;D:kaifa
    eposmavencomfasterxmljacksondatatypejackson-datatype-jdk82.9.7jackson-datatype-jdk8-2.9.7.jar;D:kaifa
    eposmavencomfasterxmljacksondatatypejackson-datatype-jsr3102.9.7jackson-datatype-jsr310-2.9.7.jar;D:kaifa
    eposmavencomfasterxmljacksonmodulejackson-module-parameter-names2.9.7jackson-module-parameter-names-2.9.7.jar;D:kaifa
    eposmavenorgspringframeworkootspring-boot-starter-tomcat2.0.7.RELEASEspring-boot-starter-tomcat-2.0.7.RELEASE.jar;D:kaifa
    eposmavenorgapache	omcatembed	omcat-embed-core8.5.35	omcat-embed-core-8.5.35.jar;D:kaifa
    eposmavenorgapache	omcatembed	omcat-embed-el8.5.35	omcat-embed-el-8.5.35.jar;D:kaifa
    eposmavenorgapache	omcatembed	omcat-embed-websocket8.5.35	omcat-embed-websocket-8.5.35.jar;D:kaifa
    eposmavenorghibernatevalidatorhibernate-validator6.0.13.Finalhibernate-validator-6.0.13.Final.jar;D:kaifa
    eposmavenjavaxvalidationvalidation-api2.0.1.Finalvalidation-api-2.0.1.Final.jar;D:kaifa
    eposmavenorgspringframeworkspring-web5.0.11.RELEASEspring-web-5.0.11.RELEASE.jar;D:kaifa
    eposmavenorgspringframeworkspring-webmvc5.0.11.RELEASEspring-webmvc-5.0.11.RELEASE.jar;D:kaifa
    eposmavenorgspringframeworkspring-expression5.0.11.RELEASEspring-expression-5.0.11.RELEASE.jar;D:kaifa
    eposmavencomh2databaseh21.4.200h2-1.4.200.jar;D:kaifa
    eposmavenorgprojectlomboklombok1.18.18lombok-1.18.18.jar;D:kaifa
    eposmavenorgspringframeworkspring-core5.0.11.RELEASEspring-core-5.0.11.RELEASE.jar;D:kaifa
    eposmavenorgspringframeworkspring-jcl5.0.11.RELEASEspring-jcl-5.0.11.RELEASE.jar;D:kaifa
    eposmavenorgapachemavenpluginsmaven-clean-plugin2.5maven-clean-plugin-2.5.jar;D:kaifa
    eposmavenorgapachemavenmaven-plugin-api2.0.6maven-plugin-api-2.0.6.jar;D:kaifa
    eposmavenorgcodehausplexusplexus-utils3.0plexus-utils-3.0.jar;D:kaifa
    eposmavenorgspringframeworkcloudspring-cloud-starter-openfeign2.0.2.RELEASEspring-cloud-starter-openfeign-2.0.2.RELEASE.jar;D:kaifa
    eposmavenorgspringframeworkcloudspring-cloud-starter2.0.2.RELEASEspring-cloud-starter-2.0.2.RELEASE.jar;D:kaifa
    eposmavenorgspringframeworkcloudspring-cloud-context2.0.2.RELEASEspring-cloud-context-2.0.2.RELEASE.jar;D:kaifa
    eposmavenorgspringframeworksecurityspring-security-rsa1.0.7.RELEASEspring-security-rsa-1.0.7.RELEASE.jar;D:kaifa
    eposmavenorgouncycastlecpkix-jdk15on1.60cpkix-jdk15on-1.60.jar;D:kaifa
    eposmavenorgouncycastlecprov-jdk15on1.60cprov-jdk15on-1.60.jar;D:kaifa
    eposmavenorgspringframeworkcloudspring-cloud-openfeign-core2.0.2.RELEASEspring-cloud-openfeign-core-2.0.2.RELEASE.jar;D:kaifa
    eposmavenorgspringframeworkcloudspring-cloud-netflix-ribbon2.0.2.RELEASEspring-cloud-netflix-ribbon-2.0.2.RELEASE.jar;D:kaifa
    eposmaveniogithubopenfeignformfeign-form-spring3.3.0feign-form-spring-3.3.0.jar;D:kaifa
    eposmaveniogithubopenfeignformfeign-form3.3.0feign-form-3.3.0.jar;D:kaifa
    eposmavencomgooglecodefindbugsannotations3.0.1annotations-3.0.1.jar;D:kaifa
    eposmaven
    etjcipjcip-annotations1.0jcip-annotations-1.0.jar;D:kaifa
    eposmavencommons-fileuploadcommons-fileupload1.3.3commons-fileupload-1.3.3.jar;D:kaifa
    eposmavencommons-iocommons-io2.2commons-io-2.2.jar;D:kaifa
    eposmavenorgspringframeworkcloudspring-cloud-commons2.0.2.RELEASEspring-cloud-commons-2.0.2.RELEASE.jar;D:kaifa
    eposmavenorgspringframeworksecurityspring-security-crypto5.0.10.RELEASEspring-security-crypto-5.0.10.RELEASE.jar;D:kaifa
    eposmaveniogithubopenfeignfeign-core9.7.0feign-core-9.7.0.jar;D:kaifa
    eposmaveniogithubopenfeignfeign-slf4j9.7.0feign-slf4j-9.7.0.jar;D:kaifa
    eposmaveniogithubopenfeignfeign-hystrix9.7.0feign-hystrix-9.7.0.jar;D:kaifa
    eposmavencom
    etflixarchaiusarchaius-core.7.6archaius-core-0.7.6.jar;D:kaifa
    eposmavencomgooglecodefindbugsjsr3053.0.1jsr305-3.0.1.jar;D:kaifa
    eposmavencomgoogleguavaguava16.0guava-16.0.jar;D:kaifa
    eposmavencom
    etflixhystrixhystrix-core1.5.12hystrix-core-1.5.12.jar;D:kaifa
    eposmavenorghdrhistogramHdrHistogram2.1.9HdrHistogram-2.1.9.jar;D:kaifa
    eposmaveniogithubopenfeignfeign-java89.7.0feign-java8-9.7.0.jar;D:kaifa
    eposmavenorgspringframeworkcloudspring-cloud-starter-netflix-eureka-client2.0.2.RELEASEspring-cloud-starter-netflix-eureka-client-2.0.2.RELEASE.jar;D:kaifa
    eposmavenorgspringframeworkcloudspring-cloud-netflix-core2.0.2.RELEASEspring-cloud-netflix-core-2.0.2.RELEASE.jar;D:kaifa
    eposmavenorgspringframeworkcloudspring-cloud-netflix-eureka-client2.0.2.RELEASEspring-cloud-netflix-eureka-client-2.0.2.RELEASE.jar;D:kaifa
    eposmavencom
    etflixeurekaeureka-client1.9.3eureka-client-1.9.3.jar;D:kaifa
    eposmavenorgcodehausjettisonjettison1.3.7jettison-1.3.7.jar;D:kaifa
    eposmavenstaxstax-api1.0.1stax-api-1.0.1.jar;D:kaifa
    eposmavencom
    etflix
    etflix-commons
    etflix-eventbus.3.0
    etflix-eventbus-0.3.0.jar;D:kaifa
    eposmavencom
    etflix
    etflix-commons
    etflix-infix.3.0
    etflix-infix-0.3.0.jar;D:kaifa
    eposmavencommons-jxpathcommons-jxpath1.3commons-jxpath-1.3.jar;D:kaifa
    eposmavenjoda-timejoda-time2.9.9joda-time-2.9.9.jar;D:kaifa
    eposmavenorgantlrantlr-runtime3.4antlr-runtime-3.4.jar;D:kaifa
    eposmavenorgantlrstringtemplate3.2.1stringtemplate-3.2.1.jar;D:kaifa
    eposmavencomgooglecodegsongson2.8.5gson-2.8.5.jar;D:kaifa
    eposmavenorgapachecommonscommons-math2.2commons-math-2.2.jar;D:kaifa
    eposmavenjavaxws
    sjsr311-api1.1.1jsr311-api-1.1.1.jar;D:kaifa
    eposmavencom
    etflixservoservo-core.12.21servo-core-0.12.21.jar;D:kaifa
    eposmavencomsunjerseyjersey-core1.19.1jersey-core-1.19.1.jar;D:kaifa
    eposmavencomsunjerseyjersey-client1.19.1jersey-client-1.19.1.jar;D:kaifa
    eposmavencomsunjerseycontribsjersey-apache-client41.19.1jersey-apache-client4-1.19.1.jar;D:kaifa
    eposmavenorgapachehttpcomponentshttpclient4.5.6httpclient-4.5.6.jar;D:kaifa
    eposmavenorgapachehttpcomponentshttpcore4.4.10httpcore-4.4.10.jar;D:kaifa
    eposmavencommons-codeccommons-codec1.11commons-codec-1.11.jar;D:kaifa
    eposmavencomgoogleinjectguice4.1.0guice-4.1.0.jar;D:kaifa
    eposmavenjavaxinjectjavax.inject1javax.inject-1.jar;D:kaifa
    eposmavenaopallianceaopalliance1.0aopalliance-1.0.jar;D:kaifa
    eposmavencomgithubvlsicompactmapcompactmap1.2.1compactmap-1.2.1.jar;D:kaifa
    eposmavencomgithubandrewomadexxdexx-collections.2dexx-collections-0.2.jar;D:kaifa
    eposmavencomfasterxmljacksoncorejackson-annotations2.9.0jackson-annotations-2.9.0.jar;D:kaifa
    eposmavencomfasterxmljacksoncorejackson-core2.9.7jackson-core-2.9.7.jar;D:kaifa
    eposmavencom
    etflixeurekaeureka-core1.9.3eureka-core-1.9.3.jar;D:kaifa
    eposmavenorgcodehauswoodstoxwoodstox-core-asl4.4.1woodstox-core-asl-4.4.1.jar;D:kaifa
    eposmavenjavaxxmlstreamstax-api1.0-2stax-api-1.0-2.jar;D:kaifa
    eposmavenorgcodehauswoodstoxstax2-api3.1.4stax2-api-3.1.4.jar;D:kaifa
    eposmavenorgspringframeworkcloudspring-cloud-starter-netflix-archaius2.0.2.RELEASEspring-cloud-starter-netflix-archaius-2.0.2.RELEASE.jar;D:kaifa
    eposmavenorgspringframeworkcloudspring-cloud-netflix-archaius2.0.2.RELEASEspring-cloud-netflix-archaius-2.0.2.RELEASE.jar;D:kaifa
    eposmavencommons-configurationcommons-configuration1.8commons-configuration-1.8.jar;D:kaifa
    eposmavencommons-langcommons-lang2.6commons-lang-2.6.jar;D:kaifa
    eposmavenorgspringframeworkcloudspring-cloud-starter-netflix-ribbon2.0.2.RELEASEspring-cloud-starter-netflix-ribbon-2.0.2.RELEASE.jar;D:kaifa
    eposmavencom
    etflix
    ibbon
    ibbon2.2.5
    ibbon-2.2.5.jar;D:kaifa
    eposmavencom
    etflix
    ibbon
    ibbon-transport2.2.5
    ibbon-transport-2.2.5.jar;D:kaifa
    eposmavenio
    eactivex
    xnetty-contexts.4.9
    xnetty-contexts-0.4.9.jar;D:kaifa
    eposmavenio
    eactivex
    xnetty-servo.4.9
    xnetty-servo-0.4.9.jar;D:kaifa
    eposmavenio
    eactivex
    xnetty.4.9
    xnetty-0.4.9.jar;D:kaifa
    eposmavencom
    etflix
    ibbon
    ibbon-core2.2.5
    ibbon-core-2.2.5.jar;D:kaifa
    eposmavencom
    etflix
    ibbon
    ibbon-httpclient2.2.5
    ibbon-httpclient-2.2.5.jar;D:kaifa
    eposmavencommons-collectionscommons-collections3.2.2commons-collections-3.2.2.jar;D:kaifa
    eposmavencom
    etflix
    etflix-commons
    etflix-commons-util.3.0
    etflix-commons-util-0.3.0.jar;D:kaifa
    eposmavencom
    etflix
    ibbon
    ibbon-loadbalancer2.2.5
    ibbon-loadbalancer-2.2.5.jar;D:kaifa
    eposmavencom
    etflix
    etflix-commons
    etflix-statistics.1.1
    etflix-statistics-0.1.1.jar;D:kaifa
    eposmavenio
    eactivex
    xjava1.3.8
    xjava-1.3.8.jar;D:kaifa
    eposmavencom
    etflix
    ibbon
    ibbon-eureka2.2.5
    ibbon-eureka-2.2.5.jar;D:kaifa
    eposmavencom	houghtworksxstreamxstream1.4.10xstream-1.4.10.jar;D:kaifa
    eposmavenxmlpullxmlpull1.1.3.1xmlpull-1.1.3.1.jar;D:kaifa
    eposmavenxpp3xpp3_min1.1.4cxpp3_min-1.1.4c.jar com.lzj1234.App
    2021-02-19 22:56:29.452  INFO 11528 --- [           main] s.c.a.AnnotationConfigApplicationContext : Refreshing org.springframework.context.annotation.AnnotationConfigApplicationContext@223d2c72: startup date [Fri Feb 19 22:56:29 CST 2021]; root of context hierarchy
    2021-02-19 22:56:29.620  INFO 11528 --- [           main] f.a.AutowiredAnnotationBeanPostProcessor : JSR-330 'javax.inject.Inject' annotation found and supported for autowiring
    2021-02-19 22:56:29.656  INFO 11528 --- [           main] trationDelegate$BeanPostProcessorChecker : Bean 'configurationPropertiesRebinderAutoConfiguration' of type [org.springframework.cloud.autoconfigure.ConfigurationPropertiesRebinderAutoConfiguration$$EnhancerBySpringCGLIB$$545391d9] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
    
      .   ____          _            __ _ _
     /\ / ___'_ __ _ _(_)_ __  __ _    
    ( ( )\___ | '_ | '_| | '_ / _` |    
     \/  ___)| |_)| | | | | || (_| |  ) ) ) )
      '  |____| .__|_| |_|_| |_\__, | / / / /
     =========|_|==============|___/=/_/_/_/
     :: Spring Boot ::        (v2.0.7.RELEASE)
    
    2021-02-19 22:56:31.220  INFO 11528 --- [           main] com.lzj1234.App                          : No active profile set, falling back to default profiles: default
    2021-02-19 22:56:31.234  INFO 11528 --- [           main] ConfigServletWebServerApplicationContext : Refreshing org.springframework.boot.web.servlet.context.AnnotationConfigServletWebServerApplicationContext@71e9ebae: startup date [Fri Feb 19 22:56:31 CST 2021]; parent: org.springframework.context.annotation.AnnotationConfigApplicationContext@223d2c72
    2021-02-19 22:56:31.862  INFO 11528 --- [           main] o.s.b.f.s.DefaultListableBeanFactory     : Overriding bean definition for bean 'dataSource' with a different definition: replacing [Root bean: class [null]; scope=refresh; abstract=false; lazyInit=false; autowireMode=3; dependencyCheck=0; autowireCandidate=false; primary=false; factoryBeanName=org.springframework.boot.autoconfigure.jdbc.DataSourceConfiguration$Hikari; factoryMethodName=dataSource; initMethodName=null; destroyMethodName=(inferred); defined in class path resource [org/springframework/boot/autoconfigure/jdbc/DataSourceConfiguration$Hikari.class]] with [Root bean: class [org.springframework.aop.scope.ScopedProxyFactoryBean]; scope=; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null; defined in BeanDefinition defined in class path resource [org/springframework/boot/autoconfigure/jdbc/DataSourceConfiguration$Hikari.class]]
    2021-02-19 22:56:31.978  INFO 11528 --- [           main] o.s.cloud.context.scope.GenericScope     : BeanFactory id=0bdaccc7-6a04-30ed-b197-e7493782dde9
    2021-02-19 22:56:32.005  INFO 11528 --- [           main] f.a.AutowiredAnnotationBeanPostProcessor : JSR-330 'javax.inject.Inject' annotation found and supported for autowiring
    2021-02-19 22:56:32.110  INFO 11528 --- [           main] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration' of type [org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration$$EnhancerBySpringCGLIB$$38398edc] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
    2021-02-19 22:56:32.147  INFO 11528 --- [           main] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.cloud.autoconfigure.ConfigurationPropertiesRebinderAutoConfiguration' of type [org.springframework.cloud.autoconfigure.ConfigurationPropertiesRebinderAutoConfiguration$$EnhancerBySpringCGLIB$$545391d9] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
    2021-02-19 22:56:32.512  INFO 11528 --- [           main] o.s.b.w.embedded.tomcat.TomcatWebServer  : Tomcat initialized with port(s): 8011 (http)
    2021-02-19 22:56:32.539  INFO 11528 --- [           main] o.apache.catalina.core.StandardService   : Starting service [Tomcat]
    2021-02-19 22:56:32.539  INFO 11528 --- [           main] org.apache.catalina.core.StandardEngine  : Starting Servlet Engine: Apache Tomcat/8.5.35
    2021-02-19 22:56:32.545  INFO 11528 --- [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: [D:kaifajavajdkin;C:WindowsSunJavain;C:Windowssystem32;C:Windows;D:kaifaanaconda;D:kaifaanacondaLibrarymingw-w64in;D:kaifaanacondaLibraryusrin;D:kaifaanacondaLibraryin;D:kaifaanacondaScripts;C:ProgramDataOracleJavajavapath;C:Windowssystem32;C:Windows;C:WindowsSystem32Wbem;C:WindowsSystem32WindowsPowerShellv1.0;C:WindowsSystem32OpenSSH;D:kaifaGitcmd;C:Program FilesPandoc;D:kaifajavajdkin;D:kaifajavajdkjrein;E:kaifahadoop-2.6.5in;C:Program FilesMicrosoft VS Codein;D:kaifaplatform-tools;D:kaifa
    odejs;D:kaifa
    odejs
    ode_global;D:kaifa
    odejs
    ode_global;C:UserslDocuments逆向softandroid-sdk_r24.4.1-windowsandroid-sdk-windowsplatform-tools;C:UserslDocuments逆向softandroid-sdk_r24.4.1-windowsandroid-sdk-windows	ools;C:UserslDocuments逆向softandroid-ndk-r21b-windows-x86_64android-ndk-r21b;D:kaifaapache-maven-3.6.3-binapache-maven-3.6.3in;%CATALINA_HOME%in;%CATALINA_HOME%lib;C:UserslAppDataLocalAndroidSdkplatform-tools;D:kaifapython3Scripts;D:kaifapython3;C:UserslAppDataLocalMicrosoftWindowsApps;;D:kaifaFiddler;C:UserslAppDataRoaming
    pm;.]
    2021-02-19 22:56:32.716  INFO 11528 --- [ost-startStop-1] o.a.c.c.C.[Tomcat].[localhost].[/]       : Initializing Spring embedded WebApplicationContext
    2021-02-19 22:56:32.717  INFO 11528 --- [ost-startStop-1] o.s.web.context.ContextLoader            : Root WebApplicationContext: initialization completed in 1483 ms
    2021-02-19 22:56:32.797  INFO 11528 --- [ost-startStop-1] o.s.b.w.servlet.ServletRegistrationBean  : Servlet dispatcherServlet mapped to [/]
    2021-02-19 22:56:32.803  INFO 11528 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean   : Mapping filter: 'characterEncodingFilter' to: [/*]
    2021-02-19 22:56:32.804  INFO 11528 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean   : Mapping filter: 'hiddenHttpMethodFilter' to: [/*]
    2021-02-19 22:56:32.804  INFO 11528 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean   : Mapping filter: 'httpPutFormContentFilter' to: [/*]
    2021-02-19 22:56:32.804  INFO 11528 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean   : Mapping filter: 'requestContextFilter' to: [/*]
    2021-02-19 22:56:32.978  INFO 11528 --- [           main] com.zaxxer.hikari.HikariDataSource       : HikariPool-1 - Starting...
    2021-02-19 22:56:33.189  INFO 11528 --- [           main] com.zaxxer.hikari.HikariDataSource       : HikariPool-1 - Start completed.
    2021-02-19 22:56:33.238  INFO 11528 --- [           main] j.LocalContainerEntityManagerFactoryBean : Building JPA container EntityManagerFactory for persistence unit 'default'
    2021-02-19 22:56:33.252  INFO 11528 --- [           main] o.hibernate.jpa.internal.util.LogHelper  : HHH000204: Processing PersistenceUnitInfo [
    	name: default
    	...]
    2021-02-19 22:56:33.325  INFO 11528 --- [           main] org.hibernate.Version                    : HHH000412: Hibernate Core {5.2.17.Final}
    2021-02-19 22:56:33.327  INFO 11528 --- [           main] org.hibernate.cfg.Environment            : HHH000206: hibernate.properties not found
    2021-02-19 22:56:33.368  INFO 11528 --- [           main] o.hibernate.annotations.common.Version   : HCANN000001: Hibernate Commons Annotations {5.0.1.Final}
    2021-02-19 22:56:33.490  INFO 11528 --- [           main] org.hibernate.dialect.Dialect            : HHH000400: Using dialect: org.hibernate.dialect.H2Dialect
    2021-02-19 22:56:33.738  INFO 11528 --- [           main] o.h.t.schema.internal.SchemaCreatorImpl  : HHH000476: Executing import script 'org.hibernate.tool.schema.internal.exec.ScriptSourceInputNonExistentImpl@421def93'
    2021-02-19 22:56:33.741  INFO 11528 --- [           main] j.LocalContainerEntityManagerFactoryBean : Initialized JPA EntityManagerFactory for persistence unit 'default'
    2021-02-19 22:56:33.772  INFO 11528 --- [           main] s.c.a.AnnotationConfigApplicationContext : Refreshing FeignContext-microservice-provider-user: startup date [Fri Feb 19 22:56:33 CST 2021]; parent: org.springframework.boot.web.servlet.context.AnnotationConfigServletWebServerApplicationContext@71e9ebae
    2021-02-19 22:56:33.791  INFO 11528 --- [           main] f.a.AutowiredAnnotationBeanPostProcessor : JSR-330 'javax.inject.Inject' annotation found and supported for autowiring
    2021-02-19 22:56:33.995  WARN 11528 --- [           main] c.n.c.sources.URLConfigurationSource     : No URLs will be polled as dynamic configuration sources.
    2021-02-19 22:56:33.996  INFO 11528 --- [           main] c.n.c.sources.URLConfigurationSource     : To enable URLs as dynamic configuration sources, define System property archaius.configurationSource.additionalUrls or make config.properties available on classpath.
    2021-02-19 22:56:34.003  WARN 11528 --- [           main] c.n.c.sources.URLConfigurationSource     : No URLs will be polled as dynamic configuration sources.
    2021-02-19 22:56:34.003  INFO 11528 --- [           main] c.n.c.sources.URLConfigurationSource     : To enable URLs as dynamic configuration sources, define System property archaius.configurationSource.additionalUrls or make config.properties available on classpath.
    2021-02-19 22:56:34.093  INFO 11528 --- [           main] o.s.w.s.handler.SimpleUrlHandlerMapping  : Mapped URL path [/**/favicon.ico] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler]
    2021-02-19 22:56:34.313  INFO 11528 --- [           main] s.w.s.m.m.a.RequestMappingHandlerAdapter : Looking for @ControllerAdvice: org.springframework.boot.web.servlet.context.AnnotationConfigServletWebServerApplicationContext@71e9ebae: startup date [Fri Feb 19 22:56:31 CST 2021]; parent: org.springframework.context.annotation.AnnotationConfigApplicationContext@223d2c72
    2021-02-19 22:56:34.348  WARN 11528 --- [           main] aWebConfiguration$JpaWebMvcConfiguration : spring.jpa.open-in-view is enabled by default. Therefore, database queries may be performed during view rendering. Explicitly configure spring.jpa.open-in-view to disable this warning
    2021-02-19 22:56:34.382  INFO 11528 --- [           main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/movies/users/{id}],methods=[GET]}" onto public com.lzj1234.User com.lzj1234.MovieController.findById(java.lang.Long)
    2021-02-19 22:56:34.385  INFO 11528 --- [           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)
    2021-02-19 22:56:34.386  INFO 11528 --- [           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)
    2021-02-19 22:56:34.430  INFO 11528 --- [           main] o.s.w.s.handler.SimpleUrlHandlerMapping  : Mapped URL path [/webjars/**] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler]
    2021-02-19 22:56:34.430  INFO 11528 --- [           main] o.s.w.s.handler.SimpleUrlHandlerMapping  : Mapped URL path [/**] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler]
    2021-02-19 22:56:37.894  INFO 11528 --- [           main] o.s.j.e.a.AnnotationMBeanExporter        : Registering beans for JMX exposure on startup
    2021-02-19 22:56:37.895  INFO 11528 --- [           main] o.s.j.e.a.AnnotationMBeanExporter        : Bean with name 'dataSource' has been autodetected for JMX exposure
    2021-02-19 22:56:37.902  INFO 11528 --- [           main] o.s.j.e.a.AnnotationMBeanExporter        : Bean with name 'refreshScope' has been autodetected for JMX exposure
    2021-02-19 22:56:37.904  INFO 11528 --- [           main] o.s.j.e.a.AnnotationMBeanExporter        : Bean with name 'configurationPropertiesRebinder' has been autodetected for JMX exposure
    2021-02-19 22:56:37.904  INFO 11528 --- [           main] o.s.j.e.a.AnnotationMBeanExporter        : Bean with name 'environmentManager' has been autodetected for JMX exposure
    2021-02-19 22:56:37.907  INFO 11528 --- [           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]
    2021-02-19 22:56:37.920  INFO 11528 --- [           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]
    2021-02-19 22:56:37.929  INFO 11528 --- [           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=71e9ebae,type=ConfigurationPropertiesRebinder]
    2021-02-19 22:56:37.935  INFO 11528 --- [           main] o.s.j.e.a.AnnotationMBeanExporter        : Located MBean 'dataSource': registering with JMX server as MBean [com.zaxxer.hikari:name=dataSource,type=HikariDataSource]
    2021-02-19 22:56:37.939  INFO 11528 --- [           main] o.s.c.support.DefaultLifecycleProcessor  : Starting beans in phase 0
    2021-02-19 22:56:37.951  INFO 11528 --- [           main] o.s.c.n.eureka.InstanceInfoFactory       : Setting initial instance status as: STARTING
    2021-02-19 22:56:37.994  INFO 11528 --- [           main] com.netflix.discovery.DiscoveryClient    : Initializing Eureka in region us-east-1
    2021-02-19 22:56:38.137  INFO 11528 --- [           main] c.n.d.provider.DiscoveryJerseyProvider   : Using JSON encoding codec LegacyJacksonJson
    2021-02-19 22:56:38.137  INFO 11528 --- [           main] c.n.d.provider.DiscoveryJerseyProvider   : Using JSON decoding codec LegacyJacksonJson
    2021-02-19 22:56:38.275  INFO 11528 --- [           main] c.n.d.provider.DiscoveryJerseyProvider   : Using XML encoding codec XStreamXml
    2021-02-19 22:56:38.275  INFO 11528 --- [           main] c.n.d.provider.DiscoveryJerseyProvider   : Using XML decoding codec XStreamXml
    2021-02-19 22:56:38.490  INFO 11528 --- [           main] c.n.d.s.r.aws.ConfigClusterResolver      : Resolving eureka endpoints via configuration
    2021-02-19 22:56:39.196  INFO 11528 --- [           main] com.netflix.discovery.DiscoveryClient    : Disable delta property : false
    2021-02-19 22:56:39.196  INFO 11528 --- [           main] com.netflix.discovery.DiscoveryClient    : Single vip registry refresh property : null
    2021-02-19 22:56:39.196  INFO 11528 --- [           main] com.netflix.discovery.DiscoveryClient    : Force full registry fetch : false
    2021-02-19 22:56:39.196  INFO 11528 --- [           main] com.netflix.discovery.DiscoveryClient    : Application is null : false
    2021-02-19 22:56:39.196  INFO 11528 --- [           main] com.netflix.discovery.DiscoveryClient    : Registered Applications size is zero : true
    2021-02-19 22:56:39.196  INFO 11528 --- [           main] com.netflix.discovery.DiscoveryClient    : Application version is -1: true
    2021-02-19 22:56:39.196  INFO 11528 --- [           main] com.netflix.discovery.DiscoveryClient    : Getting all instance registry info from the eureka server
    2021-02-19 22:56:39.371  INFO 11528 --- [           main] com.netflix.discovery.DiscoveryClient    : The response status is 200
    2021-02-19 22:56:39.374  INFO 11528 --- [           main] com.netflix.discovery.DiscoveryClient    : Starting heartbeat executor: renew interval is: 30
    2021-02-19 22:56:39.376  INFO 11528 --- [           main] c.n.discovery.InstanceInfoReplicator     : InstanceInfoReplicator onDemand update allowed rate per min is 4
    2021-02-19 22:56:39.381  INFO 11528 --- [           main] com.netflix.discovery.DiscoveryClient    : Discovery Client initialized at timestamp 1613746599380 with initial instances count: 3
    2021-02-19 22:56:39.386  INFO 11528 --- [           main] o.s.c.n.e.s.EurekaServiceRegistry        : Registering application MICROSERVICE-CONSUMER-MOVIE-FEIGN with eureka with status UP
    2021-02-19 22:56:39.386  INFO 11528 --- [           main] com.netflix.discovery.DiscoveryClient    : Saw local status change event StatusChangeEvent [timestamp=1613746599386, current=UP, previous=STARTING]
    2021-02-19 22:56:39.388  INFO 11528 --- [nfoReplicator-0] com.netflix.discovery.DiscoveryClient    : DiscoveryClient_MICROSERVICE-CONSUMER-MOVIE-FEIGN/DESKTOP-SRVQTV7:microservice-consumer-movie-feign:8011: registering service...
    2021-02-19 22:56:39.431  INFO 11528 --- [           main] o.s.b.w.embedded.tomcat.TomcatWebServer  : Tomcat started on port(s): 8011 (http) with context path ''
    2021-02-19 22:56:39.432  INFO 11528 --- [           main] .s.c.n.e.s.EurekaAutoServiceRegistration : Updating port to 8011
    2021-02-19 22:56:39.436  INFO 11528 --- [           main] com.lzj1234.App                          : Started App in 11.967 seconds (JVM running for 13.749)
    2021-02-19 22:56:39.436  INFO 11528 --- [nfoReplicator-0] com.netflix.discovery.DiscoveryClient    : DiscoveryClient_MICROSERVICE-CONSUMER-MOVIE-FEIGN/DESKTOP-SRVQTV7:microservice-consumer-movie-feign:8011 - registration status: 204
    2021-02-19 22:56:54.836  INFO 11528 --- [nio-8011-exec-1] o.a.c.c.C.[Tomcat].[localhost].[/]       : Initializing Spring FrameworkServlet 'dispatcherServlet'
    2021-02-19 22:56:54.836  INFO 11528 --- [nio-8011-exec-1] o.s.web.servlet.DispatcherServlet        : FrameworkServlet 'dispatcherServlet': initialization started
    2021-02-19 22:56:54.859  INFO 11528 --- [nio-8011-exec-1] o.s.web.servlet.DispatcherServlet        : FrameworkServlet 'dispatcherServlet': initialization completed in 23 ms
    2021-02-19 22:56:54.959  INFO 11528 --- [nio-8011-exec-1] s.c.a.AnnotationConfigApplicationContext : Refreshing SpringClientFactory-microservice-provider-user: startup date [Fri Feb 19 22:56:54 CST 2021]; parent: org.springframework.boot.web.servlet.context.AnnotationConfigServletWebServerApplicationContext@71e9ebae
    2021-02-19 22:56:55.013  INFO 11528 --- [nio-8011-exec-1] f.a.AutowiredAnnotationBeanPostProcessor : JSR-330 'javax.inject.Inject' annotation found and supported for autowiring
    2021-02-19 22:56:55.248  INFO 11528 --- [nio-8011-exec-1] c.netflix.config.ChainedDynamicProperty  : Flipping property: microservice-provider-user.ribbon.ActiveConnectionsLimit to use NEXT property: niws.loadbalancer.availabilityFilteringRule.activeConnectionsLimit = 2147483647
    2021-02-19 22:56:55.267  INFO 11528 --- [nio-8011-exec-1] c.n.u.concurrent.ShutdownEnabledTimer    : Shutdown hook installed for: NFLoadBalancer-PingTimer-microservice-provider-user
    2021-02-19 22:56:55.289  INFO 11528 --- [nio-8011-exec-1] c.netflix.loadbalancer.BaseLoadBalancer  : Client: microservice-provider-user instantiated a LoadBalancer: DynamicServerListLoadBalancer:{NFLoadBalancer:name=microservice-provider-user,current list of Servers=[],Load balancer stats=Zone stats: {},Server stats: []}ServerList:null
    2021-02-19 22:56:55.296  INFO 11528 --- [nio-8011-exec-1] c.n.l.DynamicServerListLoadBalancer      : Using serverListUpdater PollingServerListUpdater
    2021-02-19 22:56:55.318  INFO 11528 --- [nio-8011-exec-1] c.netflix.config.ChainedDynamicProperty  : Flipping property: microservice-provider-user.ribbon.ActiveConnectionsLimit to use NEXT property: niws.loadbalancer.availabilityFilteringRule.activeConnectionsLimit = 2147483647
    2021-02-19 22:56:55.320  INFO 11528 --- [nio-8011-exec-1] c.n.l.DynamicServerListLoadBalancer      : DynamicServerListLoadBalancer for client microservice-provider-user initialized: DynamicServerListLoadBalancer:{NFLoadBalancer:name=microservice-provider-user,current list of Servers=[192.168.0.106:8000],Load balancer stats=Zone stats: {defaultzone=[Zone:defaultzone;	Instance count:1;	Active connections count: 0;	Circuit breaker tripped count: 0;	Active connections per server: 0.0;]
    },Server stats: [[Server:192.168.0.106:8000;	Zone:defaultZone;	Total Requests:0;	Successive connection failure:0;	Total blackout seconds:0;	Last connection made:Thu Jan 01 08:00:00 CST 1970;	First connection made: Thu Jan 01 08:00:00 CST 1970;	Active Connections:0;	total failure count in last (1000) msecs:0;	average resp time:0.0;	90 percentile resp time:0.0;	95 percentile resp time:0.0;	min resp time:0.0;	max resp time:0.0;	stddev resp time:0.0]
    ]}ServerList:org.springframework.cloud.netflix.ribbon.eureka.DomainExtractingServerList@5da3e3ec
    2021-02-19 22:56:56.298  INFO 11528 --- [erListUpdater-0] c.netflix.config.ChainedDynamicProperty  : Flipping property: microservice-provider-user.ribbon.ActiveConnectionsLimit to use NEXT property: niws.loadbalancer.availabilityFilteringRule.activeConnectionsLimit = 2147483647
    2021-02-19 23:01:39.199  INFO 11528 --- [trap-executor-0] c.n.d.s.r.aws.ConfigClusterResolver      : Resolving eureka endpoints via configuration
    2021-02-19 23:06:39.201  INFO 11528 --- [trap-executor-0] c.n.d.s.r.aws.ConfigClusterResolver      : Resolving eureka endpoints via configuration
    2021-02-19 23:11:39.202  INFO 11528 --- [trap-executor-0] c.n.d.s.r.aws.ConfigClusterResolver      : Resolving eureka endpoints via configuration
    2021-02-19 23:16:39.203  INFO 11528 --- [trap-executor-0] c.n.d.s.r.aws.ConfigClusterResolver      : Resolving eureka endpoints via configuration
    2021-02-19 23:21:39.204  INFO 11528 --- [trap-executor-0] c.n.d.s.r.aws.ConfigClusterResolver      : Resolving eureka endpoints via configuration
    2021-02-19 23:26:39.205  INFO 11528 --- [trap-executor-0] c.n.d.s.r.aws.ConfigClusterResolver      : Resolving eureka endpoints via configuration
    2021-02-19 23:31:39.207  INFO 11528 --- [trap-executor-0] c.n.d.s.r.aws.ConfigClusterResolver      : Resolving eureka endpoints via configuration
    2021-02-19 23:36:39.208  INFO 11528 --- [trap-executor-0] c.n.d.s.r.aws.ConfigClusterResolver      : Resolving eureka endpoints via configuration
    2021-02-19 23:41:39.209  INFO 11528 --- [trap-executor-0] c.n.d.s.r.aws.ConfigClusterResolver      : Resolving eureka endpoints via configuration
    2021-02-19 23:46:39.211  INFO 11528 --- [trap-executor-0] c.n.d.s.r.aws.ConfigClusterResolver      : Resolving eureka endpoints via configuration
    2021-02-19 23:51:39.212  INFO 11528 --- [trap-executor-0] c.n.d.s.r.aws.ConfigClusterResolver      : Resolving eureka endpoints via configuration
    2021-02-19 23:56:39.213  INFO 11528 --- [trap-executor-0] c.n.d.s.r.aws.ConfigClusterResolver      : Resolving eureka endpoints via configuration
    2021-02-20 00:01:39.214  INFO 11528 --- [trap-executor-0] c.n.d.s.r.aws.ConfigClusterResolver      : Resolving eureka endpoints via configuration
    2021-02-20 00:06:39.215  INFO 11528 --- [trap-executor-0] c.n.d.s.r.aws.ConfigClusterResolver      : Resolving eureka endpoints via configuration
    2021-02-20 00:11:39.216  INFO 11528 --- [trap-executor-0] c.n.d.s.r.aws.ConfigClusterResolver      : Resolving eureka endpoints via configuration
    

      

    服务提供者打印日志

    Hibernate: select user0_.id as id1_0_0_, user0_.age as age2_0_0_, user0_.balance as balance3_0_0_, user0_.name as name4_0_0_, user0_.username as username5_0_0_ from user user0_ where user0_.id=?
    2021-02-20 00:18:39.839 TRACE 20804 --- [nio-8000-exec-8] o.h.type.descriptor.sql.BasicBinder : binding parameter [1] as [BIGINT] - [3]
    2021-02-20 00:18:39.840 TRACE 20804 --- [nio-8000-exec-8] o.h.type.descriptor.sql.BasicExtractor : extracted value ([age2_0_0_] : [INTEGER]) - [32]
    2021-02-20 00:18:39.840 TRACE 20804 --- [nio-8000-exec-8] o.h.type.descriptor.sql.BasicExtractor : extracted value ([balance3_0_0_] : [NUMERIC]) - [280.00]
    2021-02-20 00:18:39.840 TRACE 20804 --- [nio-8000-exec-8] o.h.type.descriptor.sql.BasicExtractor : extracted value ([name4_0_0_] : [VARCHAR]) - [王五]
    2021-02-20 00:18:39.840 TRACE 20804 --- [nio-8000-exec-8] o.h.type.descriptor.sql.BasicExtractor : extracted value ([username5_0_0_] : [VARCHAR]) - [account3]

    菜鸟的自白
  • 相关阅读:
    设计模式-总览
    restful
    springmvc异常统一处理(二)
    springmvc参数校验(二)
    跨语言的RPC
    更安全的RPC接口
    RPC版 “Hello World”
    用例(Use Case)
    参与者
    数据库知识基础入门
  • 原文地址:https://www.cnblogs.com/lzjloveit/p/14418246.html
Copyright © 2020-2023  润新知