Commit 79df9fe8e2edc26da484e2ee1324c5febf25ddb8
1 parent
a9fdc6b4
fix:【system 系统管理】justauth 三方登录允许禁用
Showing
1 changed file
with
3 additions
and
1 deletions
yudao-module-system/src/main/java/cn/iocoder/yudao/module/system/service/social/SocialClientServiceImpl.java
| ... | ... | @@ -54,6 +54,7 @@ import me.zhyd.oauth.model.AuthResponse; |
| 54 | 54 | import me.zhyd.oauth.model.AuthUser; |
| 55 | 55 | import me.zhyd.oauth.request.AuthRequest; |
| 56 | 56 | import me.zhyd.oauth.utils.AuthStateUtils; |
| 57 | +import org.springframework.beans.factory.annotation.Autowired; | |
| 57 | 58 | import org.springframework.beans.factory.annotation.Value; |
| 58 | 59 | import org.springframework.cache.annotation.Cacheable; |
| 59 | 60 | import org.springframework.data.redis.core.StringRedisTemplate; |
| ... | ... | @@ -101,7 +102,8 @@ public class SocialClientServiceImpl implements SocialClientService { |
| 101 | 102 | @Value("${yudao.wxa-subscribe-message.miniprogram-state:formal}") |
| 102 | 103 | public String miniprogramState; |
| 103 | 104 | |
| 104 | - @Resource | |
| 105 | + @SuppressWarnings("SpringJavaAutowiredFieldsWarningInspection") | |
| 106 | + @Autowired(required = false) // 由于 justauth.enable 配置项,可以关闭 AuthRequestFactory 的功能,所以这里只能不强制注入 | |
| 105 | 107 | private AuthRequestFactory authRequestFactory; |
| 106 | 108 | |
| 107 | 109 | @Resource | ... | ... |