• 博客园logo
  • 会员
  • 众包
  • 新闻
  • 博问
  • 闪存
  • 赞助商
  • HarmonyOS
  • Chat2DB
    • 搜索
      所有博客
    • 搜索
      当前博客
  • 写随笔 我的博客 短消息 简洁模式
    用户头像
    我的博客 我的园子 账号设置 会员中心 简洁模式 ... 退出登录
    注册 登录
 






天生自然

 
 

Powered by 博客园
博客园 | 首页 | 新随笔 | 联系 | 订阅 订阅 | 管理
上一页 1 ··· 25 26 27 28 29 30 31 32 33 ··· 276 下一页

2022年3月9日

Cannot resolve org.mybatis.spring.boot:mybatis-spring-boot
摘要: <!--mybatis --> <dependency> <groupId>org.mybatis.spring.boot</groupId> <artifactId>mybatis-spring-boot-starter</artifactId> <version>2.1.0</version> 阅读全文
posted @ 2022-03-09 19:10 吴裕雄 阅读(1950) 评论(0) 推荐(0)
 
用户登录权限验证链接跳转处理关键代码
摘要: package com.tszr.security; import org.springframework.security.core.Authentication; import org.springframework.security.core.GrantedAuthority; import 阅读全文
posted @ 2022-03-09 12:22 吴裕雄 阅读(118) 评论(0) 推荐(0)
 
认证和授权处理类关键代码
摘要: package com.tszr.security; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.annotation.Bean; import o 阅读全文
posted @ 2022-03-09 12:20 吴裕雄 阅读(65) 评论(0) 推荐(0)
 
通过重写loadUserByUsername方法查询对应用户的关键代码
摘要: package com.tszr.security; import com.tszr.entity.Authority; import com.tszr.entity.MyUser; import com.tszr.repository.MyUserRepository; import org.sp 阅读全文
posted @ 2022-03-09 11:41 吴裕雄 阅读(1104) 评论(0) 推荐(0)
 
退出登录或注销关键代码
摘要: /** * 注销用户 */ @Override public String logout(HttpServletRequest request, HttpServletResponse response) { //获得用户认证信息 Authentication authentication = Se 阅读全文
posted @ 2022-03-09 11:16 吴裕雄 阅读(196) 评论(0) 推荐(0)
 
获取当前用户权限和用户名关键代码
摘要: /** * 获得当前用户权限 */ private String getAuthorities() { Authentication authentication = SecurityContextHolder.getContext().getAuthentication(); List<Strin 阅读全文
posted @ 2022-03-09 11:10 吴裕雄 阅读(134) 评论(0) 推荐(0)
 
实现用户注册关键代码
摘要: /** * 实现注册 */ @Override public String register(MyUser userDomain) { String username = userDomain.getUsername(); List<Authority> authorityList = new Ar 阅读全文
posted @ 2022-03-09 10:56 吴裕雄 阅读(149) 评论(0) 推荐(0)
 

2022年3月6日

配置安装MongoDB
摘要: https://www.cnblogs.com/zhoulifeng/p/9429597.html 阅读全文
posted @ 2022-03-06 14:05 吴裕雄 阅读(34) 评论(0) 推荐(0)
 

2022年3月5日

解决:Unable to open JDBC Connection for DDL execution
摘要: 1、application.properties中配置错误 需要在 spring.datasource.url 属性中加上 &serverTimezone=Asia/Shanghai&useSSL=false 阅读全文
posted @ 2022-03-05 21:16 吴裕雄 阅读(1739) 评论(0) 推荐(0)
 
使用@ControllerAdvice进行全局异常处理关键代码
摘要: package com.tszr.controller; import com.tszr.exception.MyException; import org.springframework.web.bind.annotation.ControllerAdvice; import org.spring 阅读全文
posted @ 2022-03-05 19:09 吴裕雄 阅读(41) 评论(0) 推荐(0)
 
上一页 1 ··· 25 26 27 28 29 30 31 32 33 ··· 276 下一页