1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
| package com.yami.trading.security.common.adapter;
|
| import com.baomidou.mybatisplus.core.toolkit.StringUtils;
| import com.google.common.collect.Lists;
| import org.springframework.beans.factory.annotation.Value;
| import org.springframework.stereotype.Component;
|
| import java.util.Arrays;
| import java.util.List;
|
| /**
| * 授权过滤器的配置
| *
| * @author admin
| */
| @Component
| public class ResourceServerAdapter extends DefaultAuthConfigAdapter {
|
| @Value("${spring.profiles.active}")
| private String env;
|
| public static final List<String> EXCLUDE_PATH = Arrays.asList(
| "/webjars/**",
| "/swagger/**",
| "/v2/api-docs",
| "/doc.html",
| "/favicon.ico",
| "/swagger-ui.html",
| "/swagger-resources/**",
| "/captcha/**",
| "/adminLogin",
| "/hobi!**",
| "/websocket/**",
| "/api/captcha/**",
| "/api/login",
| "/api/user/login",
| "/api/user/getImageCode",
| "/api/registerNoVerifcode",
| "/api/user/registerUsername",
| "/api/systemInfoSocketServer",
| "/api/hobi**",
| "/api/normal/**",
| "/api/user/register",
| "/api/uploadFile",
| "/api/api/uploadFile",
| "/api/idcode/execute",
| "/api/item!list.action",
| "/api/item!queryBySymbol.action",
| "/api/item!relateStocks.action",
| "/api/public/uploadimg/!execute.action",
| "/api/websocket/**",
| "/api/projectBreed/getAll",
| "/api/projectBreed/getConstituentStockList",
| "/api/item/itemSummary/**",
| "/etf/klineConfig/**",
| "/api/hobi!getDepth.action",
| "/api/user/getUserNameVerifTarget",
| "/api/user/resetPsw",
| "/api/exchangerate!list.action",
| "/api/information!list.action",
| "/etf/robot/list",
| "/api/banner!list.action",
| "/api/news!list_v2_popup.action",
| "/api/news!list.action",
| "/api/authorizedLogin"
| );
|
|
| @Override
| public List<String> excludePathPatterns() {
| // if(StringUtils.isNotEmpty(env) && env.contains("local")){
| // return Lists.newArrayList("/**");
| // }
| return EXCLUDE_PATH;
| }
|
| @Override
| public List<String> maybeAuthUri() {
| return Arrays.asList(
| "/api/contractApplyOrder!openview.action",
| "/api/contractApplyOrder!closeview.action",
| "/api/assets!getContractBySymbolType.action",
| "/api/futuresOrder!openview.action",
| "/api/newOnlinechat**",
| "/api/exchangerateuserconfig!get.action",
| "/api/item/itemUserOptionalList/isItemHasAddGlobal",
| "/api/item/itemUserOptionalList/list",
| "/api/wallet/getUsdt"
| );
| }
| }
|
|