DaqProperties.java 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. package com.simuwang.base.config;
  2. import cn.hutool.core.collection.ListUtil;
  3. import lombok.Getter;
  4. import lombok.Setter;
  5. import org.springframework.boot.context.properties.ConfigurationProperties;
  6. import org.springframework.context.annotation.Configuration;
  7. import java.util.LinkedHashMap;
  8. import java.util.List;
  9. @Setter
  10. @Getter
  11. @Configuration
  12. @ConfigurationProperties(prefix = DaqProperties.DAQ_CONFIG_PREFIX)
  13. public class DaqProperties {
  14. public static final String DAQ_CONFIG_PREFIX = "simuwang";
  15. /**
  16. * 是否启用quartz定时任务功能
  17. */
  18. private Boolean enableQuartz = Boolean.FALSE;
  19. /**
  20. * 是否启用操作日志记录功能
  21. */
  22. private Boolean enableLogging = Boolean.TRUE;
  23. /**
  24. * 默认的密码
  25. */
  26. private String defaultPwd;
  27. /**
  28. * token 过期时间,单位分钟
  29. */
  30. private Long tokenExpire = 60 * 24L;
  31. /**
  32. * token 的秘钥(长度为64)
  33. */
  34. private String tokenSecret;
  35. /**
  36. * 基于rsa的加解密方式
  37. */
  38. private SecurityRsa securityRsa;
  39. /**
  40. * 自定义token过滤器的拦截白名单
  41. */
  42. private List<String> whitelist = ListUtil.list(true);
  43. /**
  44. * shiro 过滤器配置
  45. */
  46. private List<FilterChain> shiroFilterChain = ListUtil.list(true);
  47. @Setter
  48. @Getter
  49. public static class SecurityRsa {
  50. private String publicKey;
  51. private String privateKey;
  52. }
  53. @Setter
  54. @Getter
  55. public static class FilterChain {
  56. private String path;
  57. private List<String> filters;
  58. }
  59. }