提交 | 用户 | 时间
|
e7c126
|
1 |
package com.iailab.framework.security.config; |
H |
2 |
|
|
3 |
import com.iailab.framework.security.core.rpc.LoginUserRequestInterceptor; |
|
4 |
import com.iailab.module.system.api.oauth2.OAuth2TokenApi; |
|
5 |
import com.iailab.module.system.api.permission.PermissionApi; |
|
6 |
import org.springframework.boot.autoconfigure.AutoConfiguration; |
|
7 |
import org.springframework.cloud.openfeign.EnableFeignClients; |
|
8 |
import org.springframework.context.annotation.Bean; |
|
9 |
|
|
10 |
/** |
|
11 |
* Security 使用到 Feign 的配置项 |
|
12 |
* |
|
13 |
* @author iailab |
|
14 |
*/ |
|
15 |
@AutoConfiguration |
|
16 |
@EnableFeignClients(clients = {OAuth2TokenApi.class, // 主要是引入相关的 API 服务 |
|
17 |
PermissionApi.class}) |
|
18 |
public class IailabSecurityRpcAutoConfiguration { |
|
19 |
|
|
20 |
@Bean |
|
21 |
public LoginUserRequestInterceptor loginUserRequestInterceptor() { |
|
22 |
return new LoginUserRequestInterceptor(); |
|
23 |
} |
|
24 |
|
|
25 |
} |