louislivi / fastdep

Fast integration dependencies in spring boot.是一个快速集成依赖的框架,集成了一些常用公共的依赖。例:多数据源,Redis,JWT...
https://fastdep.louislivi.com
Apache License 2.0
259 stars 52 forks source link

官网文档中关于fastdep-shiro-jwt的示例代码有点小问题 #30

Open yindz opened 2 years ago

yindz commented 2 years ago

您好! 首先感谢您的项目让很多开发者节省了时间,减少了重复代码量。但我看官网文档中建议使用者重写 FastDepShiroJwtAuthorization 类的示例代码是这样的:

@RestControllerAdvice
@ConditionalOnMissingBean(FastDepShiroJwtAuthorization.class)
public class FastDepShiroJwtAuthorization implements FastDepShiroJwtAuthorizationImp {
//... ...
}

而实际上因为 @ConditionalOnMissingBean(FastDepShiroJwtAuthorization.class) 的存在,如果有不太熟悉的开发者原样Copy这块示例代码,则会达不到预期的效果。个人建议这块代码可以稍作修改(或者加一个简要的说明),比如:


@RestControllerAdvice
public class MyFastDepShiroJwtAuthorization extends FastDepShiroJwtAuthorization implements FastDepShiroJwtAuthorizationImp {
//... ...
}```
qintian95 commented 2 years ago

@yindz 官网文档在哪儿呢,没找到

yindz commented 2 years ago

@yindz 官网文档在哪儿呢,没找到

https://fastdep.louislivi.com/#/module/fastdep-shiro-jwt

qintian95 commented 2 years ago

@yindz 官网文档在哪儿呢,没找到

https://fastdep.louislivi.com/#/module/fastdep-shiro-jwt 好吧我是看集成多数据源的文档,官方只写了配置文件