![](https://img-blog.csdnimg.cn/20201014180756913.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Spring
风之飘渺
这个作者很懒,什么都没留下…
展开
-
关于JCE cannot authenticate the provider BC问题
JDK升级到17后,微信授权登录解密的代码报错。替换JDK,使用Adoptium的JDK。我使用的是换一个JDK的方法,简单高效。三、在JDK环境变量里增加文件。一、网上说替换JAR包。原创 2023-05-20 14:28:38 · 1669 阅读 · 0 评论 -
Spring boot 获取正确的IP和协议[http/https]
在使用spring boot服务的时候,一般都会加反向代理,这时候并不能正确获取真实的IP,网上解决方案说的比较明确,都可以解决问题。很少有人会问如何获取http/https,因为很少人用程序获取真实的访问路径,可能都把地址加到配置文件里了。第四个配置是帮助spring boot获取正确协议头的配置。同时也需要在application.yml里加增加一个配置,当然如果你直接从头上获取,也可以不增加配置。参数是native和framework两者选择,当然还有none不做考虑。原创 2023-02-28 21:14:16 · 866 阅读 · 0 评论 -
【解决】gateway使用Nacos重启报503 Service Unavailable
项目使用spring cloud gateway作为网关,nacos作为微服务注册中心,偶然发生服务无法调用情况,但是监测服务是注册成功的。原创 2023-01-29 16:03:15 · 1277 阅读 · 0 评论 -
SpringBoot启动报错Failed to configure a DataSource: ‘url‘ attribute is not specified
错误:Description:Failed to configure a DataSource: 'url' attribute is not specified and no embedded datasource could be configured.Reason: Failed to determine a suitable driver classAction:Consider the following: If you want an embedded database原创 2021-06-05 23:11:20 · 786 阅读 · 0 评论 -
spring boot 2.2.6 以上版本 错误:HttpMessageNotReadableException: Required request body is missing
项目升级使用spring boot 2.2.13 ,在使用postman测试接口时报错:HttpMessageNotReadableException: Required request body is missing在自己的controller的接口里接收不到body数据, 示例代码如下: @PostMapping(value = "/java/test/findByPage") public Object findByPage(@RequestBody FilterVo filt原创 2021-03-08 11:04:18 · 466 阅读 · 0 评论 -
升级Spring Boot版本与Swagger2冲突的问题
在项目从spring boot1.x升级到2.2.6时,报错***************************APPLICATION FAILED TO START***************************Description:Parameter 0 of method linkDiscoverers in org.springframework.hateoas...原创 2020-05-06 17:28:03 · 1995 阅读 · 0 评论 -
spring框架DAO搭配注解配置时注意事项
如果报错:org.hibernate.HibernateException: Could not obtain transaction-synchronized Session for current thread1、注意先后顺序context:annotation-config/>context:component-scan base-pack原创 2015-05-01 17:59:22 · 1497 阅读 · 0 评论 -
使用spring-session框架对会话session进行分布式管理
如果项目使用tomcat或是类似容器进行分布式部署,就会需要对会话session进行共享或是特殊处理,保证在线人员session的一致性。 目前有几种方案可选: 1、通过tomcat插件使用redis或是memcache进行共享共通。 2、通过cookie进行管理。 3、使用spring原创 2016-03-14 18:56:29 · 687 阅读 · 0 评论