![](https://img-blog.csdnimg.cn/20201014180756926.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
JAVA
carry杰
一头扎进代码的深渊,苦海无涯,回头是岸。
展开
-
nacos 部署 Could not retrieve transation read-only status server
nacos mysql 版本驱动适配原创 2022-10-14 10:42:57 · 531 阅读 · 1 评论 -
oauth2 返回userId
oauth2 返回userId原创 2022-07-20 15:26:02 · 787 阅读 · 0 评论 -
16进制带符号转10进制(java)
16进制带符号转10进制原创 2022-07-14 17:32:52 · 2380 阅读 · 0 评论 -
spring-boot配置Sharding分库分表时如果查询指定库表结构
spring-boot配置Sharding分库分表时如果查询指定库表结构原创 2021-12-15 15:23:06 · 1835 阅读 · 0 评论 -
Spring Cloud Gateway 注册到nacos 转发websocket 服务
1、 集群长连接 一般都需要网关。 网关选择的spring-cloud-gateway2、注册中心选择的nacos3、maven 依赖 <dependencyManagement> <dependencies> <!--支持Spring Boot 2.1.X--> <dependency> <groupId>org.springframe.原创 2021-01-28 14:26:16 · 4927 阅读 · 3 评论 -
spring-cloud-gateway GlobalFilter 自定义鉴权失败 返回数据结构
1、 在使用spring-cloud-gateway 拦截鉴权的时候的时候,错误一般返回401。我们该如果自定义自己的返回权限呢。图中红色部分就是自定义鉴权失败返回数据结构。@Configuration@ComponentScan(basePackages = "com.xx.test")@Slf4jpublic class GateWayFiler implements GlobalFilter { /** * 1.首先网关检查token是否有效,无效返回自定数据结构.原创 2020-10-23 18:02:58 · 3714 阅读 · 2 评论 -
spring cloud security oauth2 自定义token返回数据结构
1、前后端,微服务给予security oauth2的认证token 授权默认返回数据结构是但是我们希望的时候有统一的返回数据格式查看源码 可以找到 postAccessToken里面处理的数据返回所以使用 @Around 注解 拦截请求改变返回值 具体代码如下。@Component@Aspect@Slf4jpublic class AuthAspectAround { @Around("execution(* org.springframework...原创 2020-10-21 15:07:06 · 2146 阅读 · 2 评论