自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(4)
  • 收藏
  • 关注

原创 使用Druid连接池的时候出现:discard long time none received connection

解决办法:设置 druid.mysql.usePingMethod 为 false可以在 @Configuration 标注的类中添加该方法 @PostConstruct public void setUsePingMethod(){ System.setProperty("druid.mysql.usePingMethod", "false"); }网上都说可以将druid.mysql.usePingMethod设置为false来解决,但是都没有说怎么设置!!

2021-02-01 16:58:06 2171 2

转载 访问HTTPS请求遇到SSL信任问题

在Java编程中,请求远程https链接的时候,如果报了这个错误该如何解决呢?// javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to re.

2020-11-16 17:57:25 1451 2

原创 前后端时间数据交互

前后端时间数据交互前端能获取后端时间,跟后端能接收前端时间的要点是前后端的时间格式要一致在后端使用@JsonFormat注解使用方式很简单,在实体类字段加上该注解@JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone="GMT+8")private Date createdTime;如果你的是springboot项目,你想更加方便点,你也可以在yml文件上配置spring: jackson: time-zone: GMT+8

2020-11-10 22:33:18 1259

原创 Java后端如何配置跨域

Java后端如何配置跨域在springboot项目中如何设置跨域,其实很简单,只需要在Java项目中加一个配置类即可可以用这种配置类import org.springframework.beans.factory.annotation.Value;import org.springframework.context.annotation.Configuration;import org.springframework.web.servlet.config.annotation.CorsRegist

2020-11-10 21:59:42 4205

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除