
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 · 1129 阅读 · 0 评论 -
spring.factories文件作用
1、在spring-boot项目中pom文件里面添加的依赖中的bean需要注册到spring-boot项目的spring容器中 由于@ComponentScan注解只能扫描spring-boot项目包内的bean并注册到spring容器中,因此需要@EnableAutoConfiguration注解来注册项目包外的bean。而spring.factories文件,可用来记录项目包外需要注册的bean类名。 参考链接:https://blog.youkuaiyun.com/SkyeBeFreeman/article/原创 2020-05-16 12:27:11 · 3399 阅读 · 1 评论