|
|
@@ -1,6 +1,9 @@
|
|
|
package com.inspur.smsb.gateway.config;
|
|
|
|
|
|
import org.springframework.beans.factory.annotation.Value;
|
|
|
+import org.springframework.boot.context.properties.ConfigurationProperties;
|
|
|
+import org.springframework.boot.context.properties.EnableConfigurationProperties;
|
|
|
+import org.springframework.context.annotation.Configuration;
|
|
|
import org.springframework.scheduling.annotation.EnableScheduling;
|
|
|
import org.springframework.stereotype.Component;
|
|
|
import org.springframework.util.AntPathMatcher;
|
|
|
@@ -11,14 +14,14 @@ import java.util.List;
|
|
|
* @author lijiaqi
|
|
|
* @date 2024-05-28 15:03
|
|
|
*/
|
|
|
-@Component
|
|
|
-@EnableScheduling
|
|
|
+@EnableConfigurationProperties
|
|
|
+@Configuration
|
|
|
+@ConfigurationProperties(prefix = "authorization")
|
|
|
public class UrlAuthorizationDecision {
|
|
|
|
|
|
/**
|
|
|
* 路径白名单
|
|
|
*/
|
|
|
- @Value("${whitelist.paths}")
|
|
|
private List<String> whiteList;
|
|
|
|
|
|
private final AntPathMatcher antPathMatcher = new AntPathMatcher();
|