InterceptorConfig.java 784B

12345678910111213141516171819202122232425262728293031323334
  1. package com.yunzhi.demo.config;
  2. import lombok.Data;
  3. import org.springframework.boot.context.properties.ConfigurationProperties;
  4. import org.springframework.boot.context.properties.NestedConfigurationProperty;
  5. import org.springframework.stereotype.Component;
  6. @Data
  7. @Component
  8. @ConfigurationProperties(prefix = "interceptor")
  9. public class InterceptorConfig {
  10. @NestedConfigurationProperty
  11. private Config permission = new Config();
  12. @Data
  13. public static class Config {
  14. /**
  15. * 是否启用
  16. */
  17. private boolean enable;
  18. /**
  19. * 包含的路径
  20. */
  21. private String[] includePaths = new String[]{};
  22. /**
  23. * 排除路径
  24. */
  25. private String[] excludePaths = new String[]{};
  26. }
  27. }