自定义博客皮肤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)
  • 收藏
  • 关注

原创 SpringSecurity发送post请求403错误

SpringSecurity发送post请求403错误我的SpringBoot版本:2.1.4整合SpringSecurity后所有post请求都出现403错误,提示没有相关权限如图:解决方案:在WebSecurityConfigurerAdapter配置类configure方法中添加如下方法http.csrf().disable();...

2019-04-23 19:33:21 7451 1

原创 @Cacheable使用两个或多个参数作为缓存的key

@Cacheable使用两个或多个参数作为缓存的key常见的如分页查询:使用单引号指定分割符,最终会拼接为一个字符串@Cacheable(key = "#page+'-'+#pageSize")public List<User> findAllUsers(int page,int pageSize) { int pageStart = (page-1)*pageSize;...

2019-04-23 19:21:27 25893 3

原创 sec:authentication="name"取不到值

整合Springsecurity时需要获取登录的用户名使用sec:authentication="name"不能取到值springboot版本:2.1.4我的问题是thymeleaf-extras-springsecurity版本用的是4,改使用5没有问题<dependency> <groupId>org.thymeleaf.extras</groupI...

2019-04-20 15:37:54 2328 1

原创 errorCode 1045,state 28000: Access denied for user 'mysql'@'localhost' (using password: YES)

SpringBoot 项目连接数据库提示不允许登录errorCode 1045,state 28000java sql.SQLException:Access denied for user 'root'@'localhost'用户名密码均正确,我的问题是yml配置文件中密码没有使用引号,springboot版本2.1.4spring: datasource: url: jd...

2019-04-17 13:59:33 4392 3

空空如也

空空如也

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

TA关注的人

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