摘要: 使用Spring Boot + Vue 做前后端分离项目搭建,实现登录时,出现跨域请求 Access to XMLHttpRequest at 'http://localhost/open/login' from origin 'http://localhost:8080' has been blo 阅读全文
posted @ 2019-12-01 00:31 咸鱼加点盐 阅读(1030) 评论(0) 推荐(0) 编辑
摘要: 用springboot + oauth2 + redis搭建了一个项目,创建一个自定义的AuthorizationInfoBean继承org.springframework.security.core.userdetails.User,以方便后续 @Data public class Authori 阅读全文
posted @ 2019-11-27 22:54 咸鱼加点盐 阅读(3453) 评论(0) 推荐(0) 编辑
摘要: 1.安装Tomcat 进入 /usr/local/ 目录 cd /usr/local 下载 wget http://mirror.bit.edu.cn/apache/tomcat/tomcat-9/v9.0.22/bin/apache-tomcat-9.0.22.tar.gz 解压 tar -zxv 阅读全文
posted @ 2019-07-12 14:49 咸鱼加点盐 阅读(460) 评论(0) 推荐(0) 编辑
摘要: 在将redis中存储的数据进行减一操作时出现: 查看redis中存储的数据: 发现是RedisConfig中的序列化配置问题,将原本的 改为 存储到redis中的数据就会以字符串的格式存储,在进行数据运算时就会转换为对应的数值类型。 阅读全文
posted @ 2019-06-30 23:08 咸鱼加点盐 阅读(4868) 评论(0) 推荐(0) 编辑
摘要: 腾讯云服务器上部署Kafka,使用server.properties中公网IP配置: 启动时候报错: 当把公网IP改为localhost时候,Kafka可以启动成功,但是无法远程访问。后来参考https://blog.csdn.net/weixin_42583093/article/details/ 阅读全文
posted @ 2019-06-30 22:35 咸鱼加点盐 阅读(1370) 评论(0) 推荐(0) 编辑
摘要: 项目请求时报错: java.lang.ClassCastException: cn.xingaohbd.seckil.model.User cannot be cast to cn.xingaohbd.seckil.model.User at cn.xingaohbd.seckil.service. 阅读全文
posted @ 2019-06-25 11:23 咸鱼加点盐 阅读(724) 评论(0) 推荐(0) 编辑
摘要: 结合redis编写User自定义参数解析器UserArgumentResolver 1 import javax.servlet.http.Cookie; 2 import javax.servlet.http.HttpServletRequest; 3 import org.springframe 阅读全文
posted @ 2019-06-25 11:13 咸鱼加点盐 阅读(1190) 评论(0) 推荐(0) 编辑
摘要: 在Java中使用redis存储User对象时,进行JUnit测试时,控制台: 最后发现在JUnit栏中有错误: 发现是由于User对象未进行序列化导致的,最后User实现java.io.Serializable接口,再进行Junit测试,成功 阅读全文
posted @ 2019-06-24 17:13 咸鱼加点盐 阅读(2869) 评论(0) 推荐(0) 编辑
top