![](https://img-blog.csdnimg.cn/20201014180756925.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
springboot相关
xyfaneast
Java开发爱好者
展开
-
http请求调用RestTemplate和@FeignClient使用心得
一、RestTemplate请求方法使用public <T> ResponseEntity<T> exchange(String url, HttpMethod method, @Nullable HttpEntity<?> requestEntity, ParameterizedTypeReference<T> responseType, Object... uriVariables) throws RestClientException {原创 2020-10-21 11:53:36 · 1072 阅读 · 0 评论 -
spring.factories文件作用
1、在spring-boot项目中pom文件里面添加的依赖中的bean需要注册到spring-boot项目的spring容器中由于@ComponentScan注解只能扫描spring-boot项目包内的bean并注册到spring容器中,因此需要@EnableAutoConfiguration注解来注册项目包外的bean。而spring.factories文件,可用来记录项目包外需要注册的bean类名。参考链接:https://blog.csdn.net/SkyeBeFreeman/article/原创 2020-05-16 12:27:11 · 3323 阅读 · 1 评论