- 博客(12)
- 收藏
- 关注
原创 无法转换为org.springframework.http.ResponseEntity<java.lang.Object>
无法转换为org.springframework.http.ResponseEntity<java.lang.Object>
2021-12-11 11:12:18
1894
原创 ajax 请求时,谷歌(chrome)浏览器 SameSite 问题
以前写好的登录用的 SpringSession + SpringSecurity,突然登录功能不能用了。火狐以及手机上的浏览器等都没有问题,就谷歌浏览器有问题(直接在地址栏访问get接口也没有问题,但是每次 ajax 请求后台的时候,后台都会新创建一个 session,导致带权限的接口统统失效~~~~)1、问题原因2、解决方案 @Bean public CookieSerializer httpSessionIdResolver(){ DefaultCookieSe.
2021-11-06 11:17:15
1223
原创 SpringSecurity + JWT
我对 SpringSecurity的理解就是各种的过滤器1、JWT理论讲解已经很多了,也就不复制粘贴别人写的东西了官网: https://jwt.io/2、SpringSecurity现在的状态是会用,但是不太能讲清楚这是啥3、代码https://gitee.com/fyhcug/spring-security-jwt (自己根据很多教程写的 demo)如果会用一点 SpringSecurity 的话各种拦截过程应该很明了了,不会的话,建议每个方法打断点执行一遍4、过程和.
2021-08-23 16:46:27
202
原创 SpringBoot + Hbase
从来没有想过会去学习Java 大数据相关的东西,但因为项目需要,不得不使用 Hbase 存储数据,所以记录一些简单的 CRUD 过程1、安装1.1 Dockerdocker pull harisekhon/hbasedocker run -d -h docker-hbase \ -p 2181:2181 \ -p 9090:9090 \ -p 9095:9095 \ -p 16000:16000 \ -p 16010.
2021-08-23 15:33:17
737
原创 Cenos7.5 failure: repodata/repomd.xml from epel: [Errno 256] No more mirrors to try.
错误原因:yum源错误解决方案:修改 CentOS-Base.repo 文件1、切换到 yum.repos.d 目录cd /etc/yum.repos.d2、下载阿里云的Centos-7.repo文件wget -O CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo3、重新加载 yumyum clean allyum makecache如果 yum 还不能用https://bitsan
2021-07-12 20:53:16
854
原创 golang import 找不到指定模块
例如导入 “github.com/gin-gonic/gin” 时报错1 在 go.mod 中添加如下代码require ( github.com/gin-gonic/gin v1.7.2)如果报错,找不到路径解决方案:(要用 Modules)
2021-06-14 13:29:40
1268
原创 Springboot + mybatis + postgis实现增删改查
由于项目需要,用到了Geometry类型的字段,但是Java中没有提供相应的数据类型与空间数据库进行映射,经过长达两三天的踩坑,终于找到了解决方案~~参考代码https://github.com/lonelyleaf/postgis-java-demo上面代码用的 gradle,因为本人不太熟悉,所以一直无法编译通过,因此在上面代码基础上用 maven 写了一个示范程序,可供参考。xxx话不多说,直接解释我写好的示范程序(绝对可以运行)1、引入依赖 <!-- postgr
2021-03-14 21:01:21
2760
1
原创 Docker 安装ElasticSearch 7.10.1,连接被拒绝
ElasticSearch 日志中没有出现任何错误,但是就是无法访问,解决方案如下:修改 elasticsearch.yml 配置文件,添加如下配置:# 允许来自其他 IP 的连接network.host: 0.0.0.0访问成功查询容器日志: docker logs -f 容器id...
2021-01-27 00:04:00
1641
原创 Docker 学习笔记以及可能用到的一些实例
DockerDocker HubDocker Docs1、Docker安装卸载老版本sudo yum remove docker \ docker-client \ docker-client-latest \ docker-common \ docker-latest \ docker-latest-logrotate \ docker-logrotate \ docker-engine配置镜像仓库sudo yum insta
2020-12-15 12:59:18
210
原创 解决Tomcat(GeoServer)等各种跨域问题
在请求的URL前加入:https://cors-anywhere.herokuapp.com/如:https://cors-anywhere.herokuapp.com/http://localhost:8080/geoserver源码地址:https://github.com/Rob–W/cors-anywhere/
2020-12-03 16:50:13
580
1
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人
RSS订阅