spring springboot整合oauth2

1、pom.xml <?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" x...

2022-12-10 503 阅读

java javax.xml.bind.JAXBException: Implementation of JAXB-API has not been found on module path

javax.xml.bind.JAXBException: Implementation of JAXB-API has not been found on module path or classpath. at javax.xml.bind.ContextFinder.newInstance(ContextFinder.java:177) ~ at...

2022-12-10 1525 阅读

spring Spring Cloud OAuth2 实现Bad client credentials异常自定义信息返回

默认情况下申请令牌访问oauth/token未携带client_secret参数时会返回Bad client credentials     如果直接通过AuthenticationEntryPoint是无法自定义返回的信息,我们需要重写过滤...

2022-12-10 1164 阅读

spring springboot+Oauth2——自定义AuthenticationManager和认证path

本人在工作中需要构建这么一个后台框架,基于springboot,登录时认证使用自定义AuthenticationManager;同时支持Oauth2访问指定API接口,认证时的AuthenticationManager和登录规则不同。在研...

2022-12-10 612 阅读

mybatis 【mybatis】查询数据库某些字段为null的解决方法

在自己写的mapper.xml文件时,查询数据库一些字段正常、一些字段为null。 经过对比发现为null的都是采用了 “_” 的命名字段,比如last_login_time。 因为我的pojo和mapper文件都...

2022-12-10 852 阅读

Guava 缓存

public interface CacheService { //存 void setCache(String key, Object value); //取 Object getCache(String key); /** * 删除该key关联的缓存 */ void inva...

2022-12-10 494 阅读

处理时间格式化BUG:rejected value [2021-04-07]; codes [typeMismatch.student.birthday,typeMismatch.birthday,t

处理时间格式化BUG前言一、bug二、分析三、解决方案四、@DateTimeFormat和@JsonFormat的区别前言我们在开发中会处理到时间这种格式的数据,经常遇到的bug就是因为时间格式不匹配引起的。 一...

2022-12-10 876 阅读

项目表单模板-elment-el-form-两列布局-对齐排列

表单布局排列比较常见,这里记录下可以做为参考 主要用到的el-row栅格-el-card卡片el-form表单 需要注意的是el-form 需要添加属性:  :label-position 否则在el-col内不会两列或...

2022-12-10 1415 阅读

vue获取当前路由

vue 获取当前路由console.log(this.$route.path) 友情提示: $router用来操作对象,比如路由跳转的时候使用,即this.$router.push('xxxx') $route用来获取信息。比如获取当前路由this.$route...

2022-12-10 487 阅读

spring 重点--spring-security实现的token授权

在我的用户密码授权文章里介绍了spring-security的工作过程,不了解的同学,可以先看看用户密码授权这篇文章,在用户密码授权模式里,主要是通过一个登陆页进行授权,然后把授权对象写到ses...

2022-12-10 662 阅读