排序
Spring Cloud Feign如何获得接口返回的文件流
本文通过Feign实现微服务间接口调用,返回stream,从而让通过stream实现文件的下载、页面图片、视频等展示成为可能,实现代码如下。 服务端 Controller @GetMapping(value = '/fileStream/{file...
Spring Boot获取yml文件配置注入Map/List/String等类型
在Java类中,如何获取application.yml的配置内容呢?具体实现如下: 前提 用到的yml文件有application.yml、application-access-dev.yml、application-access-devSjzd.yml,其中application.yml...
Spring Boot注解@PostConstruct含义
Spring Boot项目中使用@PostConstruct注解的作用是什么呢? 参考: 注解@PostConstruct与@PreDestroy详解及实例 @PostConstruct Why use @PostConstruct?
Spring Boot如何获取HTTP请求头
获取单个Header 示例: @PostMapping(value = '/tree') public String organTree(@RequestHeader('appKey') String appKey) { return ''; } 获取所有Header 示例: @GetMapping('/listHeaders')...
Spring Boot读取jar包文件错误解决
从jar包中读取classpath下文件出错: java.io.FileNotFoundException: class path resource [conf/sendofd.xml] cannot be resolved to absolute file path because it does not reside in the ...
IntelliJ IDEA配置实现SpringBoot项目热部署的最简单方式
这里整理了几种IntelliJ IDEA配置实现SpringBoot项目热部署的方式,其中使用jrebel应该是最简单的方式,而且没有后遗症: 环境: IntelliJ IDEA 2018.3; Jrebel 2018.1.7; 方式一 1.安装jrebe...
