在使用 Spring Security 做权限管理的时候,不知道为什么突然无法注入 authenticationManager 了,而之前一个项目可以使用的,切换了不同版本的 Spring Secur......
SpringBoot Redis 设置缓存过期时间
RedisConfig.java
@Configuration
//@EnableRedisHttpSession(maxInactiveIntervalInSeconds =......
eclipse启动出现“An Error has Occurred. See the log file”解决方法
最近Eclipse频繁出现故障,其中一个就是如下,运行Eclipse,弹窗显示“An Error has Occurred. See the log file...”等信息。
解决方法是
......
Eclipse复制当前行到下一行快捷键无效
检查快捷键是否设置
Windows-->Preference-->General-->Keys
找到 Copy Line 默认设置为 Ctrl+Alt+Down
......
Spring Security 使用MD5加盐加密和BCrypt加密密码
之前我们都是使用MD5 Md5PasswordEncoder 或者SHA ShaPasswordEncoder 的哈希算法进行密码加密,在spring security中依然使用只要指定使用自定义加密......
SpringBoot2.x 整合Redis实现缓存,自定义序列化和设置过期时间
SpringBoot2.x和1.x的区别很大,比如在整合 Redis 这一块,RedisCacheManager就有不同。
本文介绍 SpringBoot 2.0.5版本 整合 Redis。
......
Spring Data JPA 使用LIKE模糊查询的问题
在学习使用 Spring Data JPA 的时候,在做一个自定义模糊查询的时候,出了点问题,这里记录下。
目的:根据用户名模糊查询
工具:Spring+SpringMVC+Spring ......
SpringBoot 拦截器直接返回JSON数据
在SpringMVC或SpringBoot中通常我们使用拦截器来拦截未登录的用户访问后台页面,如果调用接口是通过 Vue 之类的框架,我们后端通常直接返回 JSON,所以可以在拦截器里,将报错通过 r......
thymeleaf:字符串Strings常见的使用方法
判断是不是为空:
<span th:if="${name} != null">不为空</span>
<span th:if="${name} =......
SpringBoot+Spring Data JPA 实现留言评论,评论回复
先看效果图
样式是模仿哔哩哔哩的,支持二级评论。
动态效果图如下,点击图片放大
一......
WARN No appenders could be found for logger的解决方法
在spring的web项目中常常会在tomcat启动的时候出现这种提示:
log4j:WARN No appenders could be found for logger (org.s......
sqlserver2012连接JAVA: The server selected protocol version TLS10 is not accepted by client preference
刚才帮一个朋友解决了一个问题,记录下,虽然简单也花了不少时间,正好我服务器上那个风吟博客最近好像也是这个问题,项目没起来一直没管它,待会儿一起解决掉。
springboot项目,连接的是s......
The requested resource is not available. 原因,成功解决
错误图示
解决方案:File->properties(快捷键:alt+enter)->Myeclipse->web->web Context-root里必......
Error creating bean with name 'requestMappingHandlerAdapter' defined in 解决方案
刚才创建一个 SpringBoot 项目,添加了 jackson 依赖,项目无法跑起。报错如下
Error creating bean with name 'requestMappingHand......
SpringBoot Spring Security5 实现验证码登录
关于 Spring Security 权限管理实现登录之前一篇文章
SpringBoot + Spring Security + Thymeleaf 实现权限管理登录 已经介绍了。
本文主要介绍在......