background picture of the home page

欢迎光临QUQI的个人博客

梦想是成为神奇宝贝大师

你好啊,陌生人QWQ (左下角播放音乐) (右下角切换主题)

Feign远程调用服务降级处理

Feign 远程调用服务降级 在 Spring Cloud 中,Feign 服务降级(Fallback)是指当 Feign 远程调用失败时,自动执行备用逻辑,以提高系统的稳定性和容错能力。常见的失败情况包括: 目标服务宕机或不可用 网络异常 调用超时 如何实现 Feign

thumbnail of the cover of the post

OPenfig defaultConfiguration配置

@EnableFeignClients(basePackages = "...") 是 Spring Cloud OpenFeign 的注解,用于 启用 Feign 客户端,并指定需要扫描的包路径,以找到标注了 @FeignClient 的接口 3. basePackages 的作用 basePac

thumbnail of the cover of the post

Sa-token自定义Token

如果你想在 JWT Token 里面存入姓名、年龄、身高等信息,你需要在 login 时使用 Sa-Token 的自定义 Token 数据 功能,把这些额外信息编码进 Token 里。 🔥 1. 在 Token 里存储用户信息 在 login 时,除了存 userId,还可以额外存储用户信息,比如

thumbnail of the cover of the post

mybatis-plus 实现多表查询

在 MyBatis-Plus 中实现 多表查询 主要有以下几种方式: 🔥 方式 1:使用 @Select 注解(最简单) 适用于 少量自定义查询,直接在 Mapper 接口 中使用 SQL 语句。

thumbnail of the cover of the post

Springboot自动配置原理

Springboot自动配置原理? 候选人: Spring Boot的自动配置原理基于@SpringBootApplication注解,它封装了@SpringBootConfiguration、@EnableAutoConfiguration和@ComponentScan。@EnableAutoCo

thumbnail of the cover of the post

Spring中事务

Spring中的事务是如何实现的? 候选人: Spring实现事务的本质是利用AOP完成的。它对方法前后进行拦截,在执行方法前开启事务,在执行完目标方法后根据执行情况提交或回滚事务。 Spring中事务失效的场景有哪些? 候选人: 在项目中,我遇到过几种导致事务失效的场景: 如果方法内部捕获并处理了

thumbnail of the cover of the post

Spring Aop

什么是AOP? 候选人: AOP,即面向切面编程,在Spring中用于将那些与业务无关但对多个对象产生影响的公共行为和逻辑抽取出来,实现公共模块复用,降低耦合。常见的应用场景包括公共日志保存和事务处理。 你们项目中有没有使用到AOP? 候选人: 我们之前在后台管理系统中使用AOP来记录系统操作日志。

thumbnail of the cover of the post