SPRING共18篇
SpringMVC框架整合Mybatis配置多个数据库-Ddmit

SpringMVC框架整合Mybatis配置多个数据库

环境 Spring:3.1; Mybatis:3.1; 数据库:我这里是不存在主从关系的、相互独立的两个oracle数据库; 需求 系统本身是Oracle数据库,但是系统中的个别功能是查询另外的数据库(我这里是echarts...
ddmit的头像-DdmitDdmit6年前
01.2W+1
已解决:spring boot报错Unexpected EOF read on the socket-Ddmit

已解决:spring boot报错Unexpected EOF read on the socket

spring boot上传文件报错: Unexpected EOF read on the socket 解决办法: server: port: 8080 connectionTimeout: 180000 参考文章: Unexpected EOF read on the socket问题解决;
ddmit的头像-DdmitDdmit6年前
090700
全面解析Spring中@ModelAttribute注解的用法-Ddmit

全面解析Spring中@ModelAttribute注解的用法

@ModelAttribute注解用于将方法的参数或方法的返回值绑定到指定的模型属性上,并返回给Web视图。具体用法整理如下: 1.@ModelAttribute注释方法 下面的1),2),3)这三个例子类似,被@ModelAt...
ddmit的头像-DdmitDdmit6年前
062289
已解决:spring boot报错SizeLimitExceededException-Ddmit

已解决:spring boot报错SizeLimitExceededException

错误 spring boot报错: org.apache.tomcat.util.http.fileupload.FileUploadBase$SizeLimitExceededException: the request was rejected because its size (71401393) exceeds the configured...
ddmit的头像-DdmitDdmit6年前
039650
Content type ‘application/x-www-form-urlencoded;charset=UTF-8’ not supported解决-Ddmit

Content type ‘application/x-www-form-urlencoded;charset=UTF-8’ not supported解决

Spring报错:org.springframework.web.HttpMediaTypeNotSupportedException: Content type 'application/x-www-form-urlencoded;charset=UTF-8' not supported,具体解决办法如下: @PostMappin...
ddmit的头像-DdmitDdmit6年前
032220
Spring Cloud Feign如何获得接口返回的文件流-Ddmit

Spring Cloud Feign如何获得接口返回的文件流

本文通过Feign实现微服务间接口调用,返回stream,从而让通过stream实现文件的下载、页面图片、视频等展示成为可能,实现代码如下。 服务端 Controller @GetMapping(value = '/fileStream/{file...
ddmit的头像-DdmitDdmit5年前
30280
Java请求接口证书错误:unable to find valid certification path to requested target-Ddmit

Java请求接口证书错误:unable to find valid certification path to requested target

Java请求第三方接口,接口地址是https的,但是该接口如果申请的证书是自签名证书,那么为了安全,在进行调用时Java会报错: PKIX path building failed: sun.security.provider.certpath.SunCer...
ddmit的头像-DdmitDdmit4年前
028450
SpringBoot Controller接收参数的几种方式盘点-Ddmit

SpringBoot Controller接收参数的几种方式盘点

SpringBoot Controller接收参数的几种常用方式盘点如下: 一、请求路径参数 1.@PathVariable 适用于url包含请求参数的情况,例如:/common-bsp/bsp/organ/{struIds},后台接收示例: @DeleteMap...
ddmit的头像-DdmitDdmit6年前
024230
Springboot提示No beans of 'RestTemplate' type found错误-Ddmit

Springboot提示No beans of ‘RestTemplate’ type found错误

错误信息 在使用RestTemplate时,IntelliJ Idea提示Could not autowire. No beans of 'RestTemplate' type found.。 代码清单: @Component public class SmsUtil { @Autowired private RestTem...
ddmit的头像-DdmitDdmit4年前
020950
Spring Boot如何获取HTTP请求头-Ddmit

Spring Boot如何获取HTTP请求头

获取单个Header 示例: @PostMapping(value = '/tree') public String organTree(@RequestHeader('appKey') String appKey) { return ''; } 获取所有Header 示例: @GetMapping('/listHeaders')...
ddmit的头像-DdmitDdmit5年前
020380