12345678910111213141516171819202122232425262728293031323334 |
- package com.yunzhi.demo.config;
-
- import lombok.Data;
- import org.springframework.boot.context.properties.ConfigurationProperties;
- import org.springframework.boot.context.properties.NestedConfigurationProperty;
- import org.springframework.stereotype.Component;
-
- @Data
- @Component
- @ConfigurationProperties(prefix = "interceptor")
- public class InterceptorConfig {
-
- @NestedConfigurationProperty
- private Config permission = new Config();
-
- @Data
- public static class Config {
-
- /**
- * 是否启用
- */
- private boolean enable;
-
- /**
- * 包含的路径
- */
- private String[] includePaths = new String[]{};
-
- /**
- * 排除路径
- */
- private String[] excludePaths = new String[]{};
- }
- }
|