- 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
添加
1 2 3 4 | <dependency> <groupId>org.springframework.cloud</groupId> <artifactId>spring-cloud-starter-openfeign</artifactId> </dependency> |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 | <?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
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | 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
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | 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
1 2 3 4 5 6 7 8 9 10 11 12 13 | 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
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | 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
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | 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
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 | D:\kaifa\java\jdk\bin\java.exe -XX:TieredStopAtLevel= 1 -noverify -Dspring.output.ansi.enabled=always "-javaagent:E:\kaifa\java\IntelliJ IDEA 2020.3\lib\idea_rt.jar=9208:E:\kaifa\java\IntelliJ IDEA 2020.3\bin" -Dcom.sun.management.jmxremote -Dspring.jmx.enabled= true -Dspring.liveBeansView.mbeanDomain -Dspring.application.admin.enabled= true -Dfile.encoding=UTF- 8 -classpath D:\kaifa\java\jdk\jre\lib\charsets.jar;D:\kaifa\java\jdk\jre\lib\deploy.jar;D:\kaifa\java\jdk\jre\lib\ext\access-bridge- 64 .jar;D:\kaifa\java\jdk\jre\lib\ext\cldrdata.jar;D:\kaifa\java\jdk\jre\lib\ext\dnsns.jar;D:\kaifa\java\jdk\jre\lib\ext\jaccess.jar;D:\kaifa\java\jdk\jre\lib\ext\jfxrt.jar;D:\kaifa\java\jdk\jre\lib\ext\localedata.jar;D:\kaifa\java\jdk\jre\lib\ext\nashorn.jar;D:\kaifa\java\jdk\jre\lib\ext\sunec.jar;D:\kaifa\java\jdk\jre\lib\ext\sunjce_provider.jar;D:\kaifa\java\jdk\jre\lib\ext\sunmscapi.jar;D:\kaifa\java\jdk\jre\lib\ext\sunpkcs11.jar;D:\kaifa\java\jdk\jre\lib\ext\zipfs.jar;D:\kaifa\java\jdk\jre\lib\javaws.jar;D:\kaifa\java\jdk\jre\lib\jce.jar;D:\kaifa\java\jdk\jre\lib\jfr.jar;D:\kaifa\java\jdk\jre\lib\jfxswt.jar;D:\kaifa\java\jdk\jre\lib\jsse.jar;D:\kaifa\java\jdk\jre\lib\management-agent.jar;D:\kaifa\java\jdk\jre\lib\plugin.jar;D:\kaifa\java\jdk\jre\lib\resources.jar;D:\kaifa\java\jdk\jre\lib\rt.jar;C:\Users\l\javademo\microservice-consumer-movie-feign\target\classes;D:\kaifa\reposmaven\org\springframework\boot\spring-boot-starter-data-jpa\ 2.0 . 7 .RELEASE\spring-boot-starter-data-jpa- 2.0 . 7 .RELEASE.jar;D:\kaifa\reposmaven\org\springframework\boot\spring-boot-starter\ 2.0 . 7 .RELEASE\spring-boot-starter- 2.0 . 7 .RELEASE.jar;D:\kaifa\reposmaven\org\springframework\boot\spring-boot\ 2.0 . 7 .RELEASE\spring-boot- 2.0 . 7 .RELEASE.jar;D:\kaifa\reposmaven\org\springframework\boot\spring-boot-autoconfigure\ 2.0 . 7 .RELEASE\spring-boot-autoconfigure- 2.0 . 7 .RELEASE.jar;D:\kaifa\reposmaven\org\springframework\boot\spring-boot-starter-logging\ 2.0 . 7 .RELEASE\spring-boot-starter-logging- 2.0 . 7 .RELEASE.jar;D:\kaifa\reposmaven\ch\qos\logback\logback-classic\ 1.2 . 3 \logback-classic- 1.2 . 3 .jar;D:\kaifa\reposmaven\ch\qos\logback\logback-core\ 1.2 . 3 \logback-core- 1.2 . 3 .jar;D:\kaifa\reposmaven\org\apache\logging\log4j\log4j-to-slf4j\ 2.10 . 0 \log4j-to-slf4j- 2.10 . 0 .jar;D:\kaifa\reposmaven\org\apache\logging\log4j\log4j-api\ 2.10 . 0 \log4j-api- 2.10 . 0 .jar;D:\kaifa\reposmaven\org\slf4j\jul-to-slf4j\ 1.7 . 25 \jul-to-slf4j- 1.7 . 25 .jar;D:\kaifa\reposmaven\javax\annotation\javax.annotation-api\ 1.3 . 2 \javax.annotation-api- 1.3 . 2 .jar;D:\kaifa\reposmaven\org\yaml\snakeyaml\ 1.19 \snakeyaml- 1.19 .jar;D:\kaifa\reposmaven\org\springframework\boot\spring-boot-starter-aop\ 2.0 . 7 .RELEASE\spring-boot-starter-aop- 2.0 . 7 .RELEASE.jar;D:\kaifa\reposmaven\org\springframework\spring-aop\ 5.0 . 11 .RELEASE\spring-aop- 5.0 . 11 .RELEASE.jar;D:\kaifa\reposmaven\org\aspectj\aspectjweaver\ 1.8 . 13 \aspectjweaver- 1.8 . 13 .jar;D:\kaifa\reposmaven\org\springframework\boot\spring-boot-starter-jdbc\ 2.0 . 7 .RELEASE\spring-boot-starter-jdbc- 2.0 . 7 .RELEASE.jar;D:\kaifa\reposmaven\com\zaxxer\HikariCP\ 2.7 . 9 \HikariCP- 2.7 . 9 .jar;D:\kaifa\reposmaven\org\springframework\spring-jdbc\ 5.0 . 11 .RELEASE\spring-jdbc- 5.0 . 11 .RELEASE.jar;D:\kaifa\reposmaven\javax\transaction\javax.transaction-api\ 1.2 \javax.transaction-api- 1.2 .jar;D:\kaifa\reposmaven\org\hibernate\hibernate-core\ 5.2 . 17 .Final\hibernate-core- 5.2 . 17 .Final.jar;D:\kaifa\reposmaven\org\jboss\logging\jboss-logging\ 3.3 . 2 .Final\jboss-logging- 3.3 . 2 .Final.jar;D:\kaifa\reposmaven\org\hibernate\javax\persistence\hibernate-jpa- 2.1 -api\ 1.0 . 2 .Final\hibernate-jpa- 2.1 -api- 1.0 . 2 .Final.jar;D:\kaifa\reposmaven\org\javassist\javassist\ 3.22 . 0 -GA\javassist- 3.22 . 0 -GA.jar;D:\kaifa\reposmaven\antlr\antlr\ 2.7 . 7 \antlr- 2.7 . 7 .jar;D:\kaifa\reposmaven\org\jboss\jandex\ 2.0 . 3 .Final\jandex- 2.0 . 3 .Final.jar;D:\kaifa\reposmaven\com\fasterxml\classmate\ 1.3 . 4 \classmate- 1.3 . 4 .jar;D:\kaifa\reposmaven\dom4j\dom4j\ 1.6 . 1 \dom4j- 1.6 . 1 .jar;D:\kaifa\reposmaven\org\hibernate\common\hibernate-commons-annotations\ 5.0 . 1 .Final\hibernate-commons-annotations- 5.0 . 1 .Final.jar;D:\kaifa\reposmaven\org\springframework\data\spring-data-jpa\ 2.0 . 12 .RELEASE\spring-data-jpa- 2.0 . 12 .RELEASE.jar;D:\kaifa\reposmaven\org\springframework\data\spring-data-commons\ 2.0 . 12 .RELEASE\spring-data-commons- 2.0 . 12 .RELEASE.jar;D:\kaifa\reposmaven\org\springframework\spring-orm\ 5.0 . 11 .RELEASE\spring-orm- 5.0 . 11 .RELEASE.jar;D:\kaifa\reposmaven\org\springframework\spring-context\ 5.0 . 11 .RELEASE\spring-context- 5.0 . 11 .RELEASE.jar;D:\kaifa\reposmaven\org\springframework\spring-tx\ 5.0 . 11 .RELEASE\spring-tx- 5.0 . 11 .RELEASE.jar;D:\kaifa\reposmaven\org\springframework\spring-beans\ 5.0 . 11 .RELEASE\spring-beans- 5.0 . 11 .RELEASE.jar;D:\kaifa\reposmaven\org\slf4j\slf4j-api\ 1.7 . 25 \slf4j-api- 1.7 . 25 .jar;D:\kaifa\reposmaven\org\springframework\spring-aspects\ 5.0 . 11 .RELEASE\spring-aspects- 5.0 . 11 .RELEASE.jar;D:\kaifa\reposmaven\org\springframework\boot\spring-boot-starter-web\ 2.0 . 7 .RELEASE\spring-boot-starter-web- 2.0 . 7 .RELEASE.jar;D:\kaifa\reposmaven\org\springframework\boot\spring-boot-starter-json\ 2.0 . 7 .RELEASE\spring-boot-starter-json- 2.0 . 7 .RELEASE.jar;D:\kaifa\reposmaven\com\fasterxml\jackson\core\jackson-databind\ 2.9 . 7 \jackson-databind- 2.9 . 7 .jar;D:\kaifa\reposmaven\com\fasterxml\jackson\datatype\jackson-datatype-jdk8\ 2.9 . 7 \jackson-datatype-jdk8- 2.9 . 7 .jar;D:\kaifa\reposmaven\com\fasterxml\jackson\datatype\jackson-datatype-jsr310\ 2.9 . 7 \jackson-datatype-jsr310- 2.9 . 7 .jar;D:\kaifa\reposmaven\com\fasterxml\jackson\module\jackson-module-parameter-names\ 2.9 . 7 \jackson-module-parameter-names- 2.9 . 7 .jar;D:\kaifa\reposmaven\org\springframework\boot\spring-boot-starter-tomcat\ 2.0 . 7 .RELEASE\spring-boot-starter-tomcat- 2.0 . 7 .RELEASE.jar;D:\kaifa\reposmaven\org\apache\tomcat\embed\tomcat-embed-core\ 8.5 . 35 \tomcat-embed-core- 8.5 . 35 .jar;D:\kaifa\reposmaven\org\apache\tomcat\embed\tomcat-embed-el\ 8.5 . 35 \tomcat-embed-el- 8.5 . 35 .jar;D:\kaifa\reposmaven\org\apache\tomcat\embed\tomcat-embed-websocket\ 8.5 . 35 \tomcat-embed-websocket- 8.5 . 35 .jar;D:\kaifa\reposmaven\org\hibernate\validator\hibernate-validator\ 6.0 . 13 .Final\hibernate-validator- 6.0 . 13 .Final.jar;D:\kaifa\reposmaven\javax\validation\validation-api\ 2.0 . 1 .Final\validation-api- 2.0 . 1 .Final.jar;D:\kaifa\reposmaven\org\springframework\spring-web\ 5.0 . 11 .RELEASE\spring-web- 5.0 . 11 .RELEASE.jar;D:\kaifa\reposmaven\org\springframework\spring-webmvc\ 5.0 . 11 .RELEASE\spring-webmvc- 5.0 . 11 .RELEASE.jar;D:\kaifa\reposmaven\org\springframework\spring-expression\ 5.0 . 11 .RELEASE\spring-expression- 5.0 . 11 .RELEASE.jar;D:\kaifa\reposmaven\com\h2database\h2\ 1.4 . 200 \h2- 1.4 . 200 .jar;D:\kaifa\reposmaven\org\projectlombok\lombok\ 1.18 . 18 \lombok- 1.18 . 18 .jar;D:\kaifa\reposmaven\org\springframework\spring-core\ 5.0 . 11 .RELEASE\spring-core- 5.0 . 11 .RELEASE.jar;D:\kaifa\reposmaven\org\springframework\spring-jcl\ 5.0 . 11 .RELEASE\spring-jcl- 5.0 . 11 .RELEASE.jar;D:\kaifa\reposmaven\org\apache\maven\plugins\maven-clean-plugin\ 2.5 \maven-clean-plugin- 2.5 .jar;D:\kaifa\reposmaven\org\apache\maven\maven-plugin-api\ 2.0 . 6 \maven-plugin-api- 2.0 . 6 .jar;D:\kaifa\reposmaven\org\codehaus\plexus\plexus-utils\ 3.0 \plexus-utils- 3.0 .jar;D:\kaifa\reposmaven\org\springframework\cloud\spring-cloud-starter-openfeign\ 2.0 . 2 .RELEASE\spring-cloud-starter-openfeign- 2.0 . 2 .RELEASE.jar;D:\kaifa\reposmaven\org\springframework\cloud\spring-cloud-starter\ 2.0 . 2 .RELEASE\spring-cloud-starter- 2.0 . 2 .RELEASE.jar;D:\kaifa\reposmaven\org\springframework\cloud\spring-cloud-context\ 2.0 . 2 .RELEASE\spring-cloud-context- 2.0 . 2 .RELEASE.jar;D:\kaifa\reposmaven\org\springframework\security\spring-security-rsa\ 1.0 . 7 .RELEASE\spring-security-rsa- 1.0 . 7 .RELEASE.jar;D:\kaifa\reposmaven\org\bouncycastle\bcpkix-jdk15on\ 1.60 \bcpkix-jdk15on- 1.60 .jar;D:\kaifa\reposmaven\org\bouncycastle\bcprov-jdk15on\ 1.60 \bcprov-jdk15on- 1.60 .jar;D:\kaifa\reposmaven\org\springframework\cloud\spring-cloud-openfeign-core\ 2.0 . 2 .RELEASE\spring-cloud-openfeign-core- 2.0 . 2 .RELEASE.jar;D:\kaifa\reposmaven\org\springframework\cloud\spring-cloud-netflix-ribbon\ 2.0 . 2 .RELEASE\spring-cloud-netflix-ribbon- 2.0 . 2 .RELEASE.jar;D:\kaifa\reposmaven\io\github\openfeign\form\feign-form-spring\ 3.3 . 0 \feign-form-spring- 3.3 . 0 .jar;D:\kaifa\reposmaven\io\github\openfeign\form\feign-form\ 3.3 . 0 \feign-form- 3.3 . 0 .jar;D:\kaifa\reposmaven\com\google\code\findbugs\annotations\ 3.0 . 1 \annotations- 3.0 . 1 .jar;D:\kaifa\reposmaven\net\jcip\jcip-annotations\ 1.0 \jcip-annotations- 1.0 .jar;D:\kaifa\reposmaven\commons-fileupload\commons-fileupload\ 1.3 . 3 \commons-fileupload- 1.3 . 3 .jar;D:\kaifa\reposmaven\commons-io\commons-io\ 2.2 \commons-io- 2.2 .jar;D:\kaifa\reposmaven\org\springframework\cloud\spring-cloud-commons\ 2.0 . 2 .RELEASE\spring-cloud-commons- 2.0 . 2 .RELEASE.jar;D:\kaifa\reposmaven\org\springframework\security\spring-security-crypto\ 5.0 . 10 .RELEASE\spring-security-crypto- 5.0 . 10 .RELEASE.jar;D:\kaifa\reposmaven\io\github\openfeign\feign-core\ 9.7 . 0 \feign-core- 9.7 . 0 .jar;D:\kaifa\reposmaven\io\github\openfeign\feign-slf4j\ 9.7 . 0 \feign-slf4j- 9.7 . 0 .jar;D:\kaifa\reposmaven\io\github\openfeign\feign-hystrix\ 9.7 . 0 \feign-hystrix- 9.7 . 0 .jar;D:\kaifa\reposmaven\com\netflix\archaius\archaius-core\ 0.7 . 6 \archaius-core- 0.7 . 6 .jar;D:\kaifa\reposmaven\com\google\code\findbugs\jsr305\ 3.0 . 1 \jsr305- 3.0 . 1 .jar;D:\kaifa\reposmaven\com\google\guava\guava\ 16.0 \guava- 16.0 .jar;D:\kaifa\reposmaven\com\netflix\hystrix\hystrix-core\ 1.5 . 12 \hystrix-core- 1.5 . 12 .jar;D:\kaifa\reposmaven\org\hdrhistogram\HdrHistogram\ 2.1 . 9 \HdrHistogram- 2.1 . 9 .jar;D:\kaifa\reposmaven\io\github\openfeign\feign-java8\ 9.7 . 0 \feign-java8- 9.7 . 0 .jar;D:\kaifa\reposmaven\org\springframework\cloud\spring-cloud-starter-netflix-eureka-client\ 2.0 . 2 .RELEASE\spring-cloud-starter-netflix-eureka-client- 2.0 . 2 .RELEASE.jar;D:\kaifa\reposmaven\org\springframework\cloud\spring-cloud-netflix-core\ 2.0 . 2 .RELEASE\spring-cloud-netflix-core- 2.0 . 2 .RELEASE.jar;D:\kaifa\reposmaven\org\springframework\cloud\spring-cloud-netflix-eureka-client\ 2.0 . 2 .RELEASE\spring-cloud-netflix-eureka-client- 2.0 . 2 .RELEASE.jar;D:\kaifa\reposmaven\com\netflix\eureka\eureka-client\ 1.9 . 3 \eureka-client- 1.9 . 3 .jar;D:\kaifa\reposmaven\org\codehaus\jettison\jettison\ 1.3 . 7 \jettison- 1.3 . 7 .jar;D:\kaifa\reposmaven\stax\stax-api\ 1.0 . 1 \stax-api- 1.0 . 1 .jar;D:\kaifa\reposmaven\com\netflix\netflix-commons\netflix-eventbus\ 0.3 . 0 \netflix-eventbus- 0.3 . 0 .jar;D:\kaifa\reposmaven\com\netflix\netflix-commons\netflix-infix\ 0.3 . 0 \netflix-infix- 0.3 . 0 .jar;D:\kaifa\reposmaven\commons-jxpath\commons-jxpath\ 1.3 \commons-jxpath- 1.3 .jar;D:\kaifa\reposmaven\joda-time\joda-time\ 2.9 . 9 \joda-time- 2.9 . 9 .jar;D:\kaifa\reposmaven\org\antlr\antlr-runtime\ 3.4 \antlr-runtime- 3.4 .jar;D:\kaifa\reposmaven\org\antlr\stringtemplate\ 3.2 . 1 \stringtemplate- 3.2 . 1 .jar;D:\kaifa\reposmaven\com\google\code\gson\gson\ 2.8 . 5 \gson- 2.8 . 5 .jar;D:\kaifa\reposmaven\org\apache\commons\commons-math\ 2.2 \commons-math- 2.2 .jar;D:\kaifa\reposmaven\javax\ws\rs\jsr311-api\ 1.1 . 1 \jsr311-api- 1.1 . 1 .jar;D:\kaifa\reposmaven\com\netflix\servo\servo-core\ 0.12 . 21 \servo-core- 0.12 . 21 .jar;D:\kaifa\reposmaven\com\sun\jersey\jersey-core\ 1.19 . 1 \jersey-core- 1.19 . 1 .jar;D:\kaifa\reposmaven\com\sun\jersey\jersey-client\ 1.19 . 1 \jersey-client- 1.19 . 1 .jar;D:\kaifa\reposmaven\com\sun\jersey\contribs\jersey-apache-client4\ 1.19 . 1 \jersey-apache-client4- 1.19 . 1 .jar;D:\kaifa\reposmaven\org\apache\httpcomponents\httpclient\ 4.5 . 6 \httpclient- 4.5 . 6 .jar;D:\kaifa\reposmaven\org\apache\httpcomponents\httpcore\ 4.4 . 10 \httpcore- 4.4 . 10 .jar;D:\kaifa\reposmaven\commons-codec\commons-codec\ 1.11 \commons-codec- 1.11 .jar;D:\kaifa\reposmaven\com\google\inject\guice\ 4.1 . 0 \guice- 4.1 . 0 .jar;D:\kaifa\reposmaven\javax\inject\javax.inject\ 1 \javax.inject- 1 .jar;D:\kaifa\reposmaven\aopalliance\aopalliance\ 1.0 \aopalliance- 1.0 .jar;D:\kaifa\reposmaven\com\github\vlsi\compactmap\compactmap\ 1.2 . 1 \compactmap- 1.2 . 1 .jar;D:\kaifa\reposmaven\com\github\andrewoma\dexx\dexx-collections\ 0.2 \dexx-collections- 0.2 .jar;D:\kaifa\reposmaven\com\fasterxml\jackson\core\jackson-annotations\ 2.9 . 0 \jackson-annotations- 2.9 . 0 .jar;D:\kaifa\reposmaven\com\fasterxml\jackson\core\jackson-core\ 2.9 . 7 \jackson-core- 2.9 . 7 .jar;D:\kaifa\reposmaven\com\netflix\eureka\eureka-core\ 1.9 . 3 \eureka-core- 1.9 . 3 .jar;D:\kaifa\reposmaven\org\codehaus\woodstox\woodstox-core-asl\ 4.4 . 1 \woodstox-core-asl- 4.4 . 1 .jar;D:\kaifa\reposmaven\javax\xml\stream\stax-api\ 1.0 - 2 \stax-api- 1.0 - 2 .jar;D:\kaifa\reposmaven\org\codehaus\woodstox\stax2-api\ 3.1 . 4 \stax2-api- 3.1 . 4 .jar;D:\kaifa\reposmaven\org\springframework\cloud\spring-cloud-starter-netflix-archaius\ 2.0 . 2 .RELEASE\spring-cloud-starter-netflix-archaius- 2.0 . 2 .RELEASE.jar;D:\kaifa\reposmaven\org\springframework\cloud\spring-cloud-netflix-archaius\ 2.0 . 2 .RELEASE\spring-cloud-netflix-archaius- 2.0 . 2 .RELEASE.jar;D:\kaifa\reposmaven\commons-configuration\commons-configuration\ 1.8 \commons-configuration- 1.8 .jar;D:\kaifa\reposmaven\commons-lang\commons-lang\ 2.6 \commons-lang- 2.6 .jar;D:\kaifa\reposmaven\org\springframework\cloud\spring-cloud-starter-netflix-ribbon\ 2.0 . 2 .RELEASE\spring-cloud-starter-netflix-ribbon- 2.0 . 2 .RELEASE.jar;D:\kaifa\reposmaven\com\netflix\ribbon\ribbon\ 2.2 . 5 \ribbon- 2.2 . 5 .jar;D:\kaifa\reposmaven\com\netflix\ribbon\ribbon-transport\ 2.2 . 5 \ribbon-transport- 2.2 . 5 .jar;D:\kaifa\reposmaven\io\reactivex\rxnetty-contexts\ 0.4 . 9 \rxnetty-contexts- 0.4 . 9 .jar;D:\kaifa\reposmaven\io\reactivex\rxnetty-servo\ 0.4 . 9 \rxnetty-servo- 0.4 . 9 .jar;D:\kaifa\reposmaven\io\reactivex\rxnetty\ 0.4 . 9 \rxnetty- 0.4 . 9 .jar;D:\kaifa\reposmaven\com\netflix\ribbon\ribbon-core\ 2.2 . 5 \ribbon-core- 2.2 . 5 .jar;D:\kaifa\reposmaven\com\netflix\ribbon\ribbon-httpclient\ 2.2 . 5 \ribbon-httpclient- 2.2 . 5 .jar;D:\kaifa\reposmaven\commons-collections\commons-collections\ 3.2 . 2 \commons-collections- 3.2 . 2 .jar;D:\kaifa\reposmaven\com\netflix\netflix-commons\netflix-commons-util\ 0.3 . 0 \netflix-commons-util- 0.3 . 0 .jar;D:\kaifa\reposmaven\com\netflix\ribbon\ribbon-loadbalancer\ 2.2 . 5 \ribbon-loadbalancer- 2.2 . 5 .jar;D:\kaifa\reposmaven\com\netflix\netflix-commons\netflix-statistics\ 0.1 . 1 \netflix-statistics- 0.1 . 1 .jar;D:\kaifa\reposmaven\io\reactivex\rxjava\ 1.3 . 8 \rxjava- 1.3 . 8 .jar;D:\kaifa\reposmaven\com\netflix\ribbon\ribbon-eureka\ 2.2 . 5 \ribbon-eureka- 2.2 . 5 .jar;D:\kaifa\reposmaven\com\thoughtworks\xstream\xstream\ 1.4 . 10 \xstream- 1.4 . 10 .jar;D:\kaifa\reposmaven\xmlpull\xmlpull\ 1.1 . 3.1 \xmlpull- 1.1 . 3.1 .jar;D:\kaifa\reposmaven\xpp3\xpp3_min\ 1.1 .4c\xpp3_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:\kaifa\java\jdk\bin;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;D:\kaifa\anaconda;D:\kaifa\anaconda\Library\mingw-w64\bin;D:\kaifa\anaconda\Library\usr\bin;D:\kaifa\anaconda\Library\bin;D:\kaifa\anaconda\Scripts;C:\ProgramData\Oracle\Java\javapath;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1. 0 \;C:\Windows\System32\OpenSSH\;D:\kaifa\Git\cmd;C:\Program Files\Pandoc\;D:\kaifa\java\jdk\bin;D:\kaifa\java\jdk\jre\bin;E:\kaifa\hadoop- 2.6 . 5 \bin;C:\Program Files\Microsoft VS Code\bin;D:\kaifa\platform-tools;D:\kaifa\nodejs\;D:\kaifa\nodejs\node_global;D:\kaifa\nodejs\node_global;C:\Users\l\Documents\逆向\soft\android-sdk_r24. 4.1 -windows\android-sdk-windows\platform-tools;C:\Users\l\Documents\逆向\soft\android-sdk_r24. 4.1 -windows\android-sdk-windows\tools;C:\Users\l\Documents\逆向\soft\android-ndk-r21b-windows-x86_64\android-ndk-r21b;D:\kaifa\apache-maven- 3.6 . 3 -bin\apache-maven- 3.6 . 3 \bin;%CATALINA_HOME%\bin;%CATALINA_HOME%\lib;C:\Users\l\AppData\Local\Android\Sdk\platform-tools;D:\kaifa\python3\Scripts\;D:\kaifa\python3\;C:\Users\l\AppData\Local\Microsoft\WindowsApps;;D:\kaifa\Fiddler;C:\Users\l\AppData\Roaming\npm;.] 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]
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· go语言实现终端里的倒计时
· 如何编写易于单元测试的代码
· 10年+ .NET Coder 心语,封装的思维:从隐藏、稳定开始理解其本质意义
· .NET Core 中如何实现缓存的预热?
· 从 HTTP 原因短语缺失研究 HTTP/2 和 HTTP/3 的设计差异
· 分享一个免费、快速、无限量使用的满血 DeepSeek R1 模型,支持深度思考和联网搜索!
· 使用C#创建一个MCP客户端
· ollama系列1:轻松3步本地部署deepseek,普通电脑可用
· 基于 Docker 搭建 FRP 内网穿透开源项目(很简单哒)
· 按钮权限的设计及实现