KmallConfig.java 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119
  1. package com.emato.biz.config;
  2. import org.springframework.beans.factory.annotation.Value;
  3. import org.springframework.boot.context.properties.ConfigurationProperties;
  4. import org.springframework.context.annotation.PropertySource;
  5. import org.springframework.stereotype.Component;
  6. /**
  7. * 读取代码生成相关配置
  8. *
  9. * @author cadmin
  10. */
  11. @Component
  12. @ConfigurationProperties(prefix = "kmall")
  13. @PropertySource(value = {"classpath:kmall-config.yml"})
  14. public class KmallConfig {
  15. public static Integer querySize;
  16. // 商户编号
  17. public static String merchSn;
  18. // 商户名称
  19. public static String merchName;
  20. // 商户简称
  21. public static String merchShortName;
  22. // 第三方商户编号
  23. public static String thirdSn;
  24. // 生产环境密钥
  25. public static String md5Salt;
  26. private static String queryAllInveMngUrl;
  27. private static String queryAllShopInveMngUrl;
  28. public static String requestToKmall;
  29. public static String getMerchSn() {
  30. return merchSn;
  31. }
  32. @Value("${merchSn}")
  33. public void setMerchSn(String merchSn) {
  34. this.merchSn = merchSn;
  35. }
  36. public static String getMerchName() {
  37. return merchName;
  38. }
  39. @Value("${merchName}")
  40. public void setMerchName(String merchName) {
  41. this.merchName = merchName;
  42. }
  43. public static String getMerchShortName() {
  44. return merchShortName;
  45. }
  46. @Value("${merchShortName}")
  47. public void setMerchShortName(String merchShortName) {
  48. this.merchShortName = merchShortName;
  49. }
  50. public static String getThirdSn() {
  51. return thirdSn;
  52. }
  53. @Value("${thirdSn}")
  54. public void setThirdSn(String thirdSn) {
  55. this.thirdSn = thirdSn;
  56. }
  57. public static String getMd5Salt() {
  58. return md5Salt;
  59. }
  60. @Value("${md5Salt}")
  61. public void setMd5Salt(String md5Salt) {
  62. this.md5Salt = md5Salt;
  63. }
  64. public static Integer getQuerySize() {
  65. return querySize;
  66. }
  67. @Value("${querySize}")
  68. public void setQuerySize(Integer querySize) {
  69. KmallConfig.querySize = querySize;
  70. }
  71. public static String getQueryAllInveMngUrl() {
  72. return queryAllInveMngUrl;
  73. }
  74. @Value("${queryAllInveMngUrl}")
  75. public void setQueryAllInveMngUrl(String queryAllInveMngUrl) {
  76. KmallConfig.queryAllInveMngUrl = queryAllInveMngUrl;
  77. }
  78. public static String getQueryAllShopInveMngUrl() {
  79. return queryAllShopInveMngUrl;
  80. }
  81. @Value("${queryAllShopInveMngUrl}")
  82. public void setQueryAllShopInveMngUrl(String queryAllShopInveMngUrl) {
  83. KmallConfig.queryAllShopInveMngUrl = queryAllShopInveMngUrl;
  84. }
  85. public static String getRequestToKmall() {
  86. return requestToKmall;
  87. }
  88. @Value("${requestToKmall}")
  89. public void setRequestToKmall(String requestToKmall) {
  90. KmallConfig.requestToKmall = requestToKmall;
  91. }
  92. }