SystemObject.java 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. package com.gzlh.config;
  2. import com.gzlh.device.capture.factory.CaptureFactory;
  3. import com.gzlh.device.capture.properties.CapturePropertiesConfig;
  4. import com.gzlh.device.infrared.config.RedPropertiesConfig;
  5. import com.gzlh.device.infrared.factory.RedFactory;
  6. import com.gzlh.device.led.factory.LedFactory;
  7. import com.gzlh.device.weighbridge.config.WeighbridgePropertiesConfig;
  8. import com.gzlh.device.weighbridge.factory.WeighbridgeFactory;
  9. import org.springframework.beans.factory.annotation.Autowired;
  10. import org.springframework.stereotype.Component;
  11. @Component
  12. public class SystemObject {
  13. public static ApplicationConfig applicationConfig;
  14. public static FilePropertiesConfig filePropertiesConfig;
  15. public static RedFactory redFactory;
  16. public static RedPropertiesConfig redPropertiesConfig;
  17. public static WeighbridgeFactory weighbridgeFactory;
  18. public static WeighbridgePropertiesConfig weighbridgePropertiesConfig;
  19. public static LedFactory ledFactory;
  20. public static CaptureFactory captureFactory;
  21. public static CapturePropertiesConfig capturePropertiesConfig;
  22. @Autowired
  23. void setApplicationConfig(ApplicationConfig applicationConfig) {
  24. SystemObject.applicationConfig = applicationConfig;
  25. }
  26. @Autowired
  27. void setFilePropertiesConfig(FilePropertiesConfig filePropertiesConfig) {
  28. SystemObject.filePropertiesConfig = filePropertiesConfig;
  29. }
  30. @Autowired
  31. void setRedFactory(RedFactory redFactory) {
  32. SystemObject.redFactory = redFactory;
  33. }
  34. @Autowired
  35. void setRedPropertiesConfig(RedPropertiesConfig redPropertiesConfig) {
  36. SystemObject.redPropertiesConfig = redPropertiesConfig;
  37. }
  38. @Autowired
  39. void setWeighbridgeFactory(WeighbridgeFactory weighbridgeFactory) {
  40. SystemObject.weighbridgeFactory = weighbridgeFactory;
  41. }
  42. @Autowired
  43. void setWeighbridgePropertiesConfig(WeighbridgePropertiesConfig weighbridgePropertiesConfig) {
  44. SystemObject.weighbridgePropertiesConfig = weighbridgePropertiesConfig;
  45. }
  46. @Autowired
  47. void setLedFactory(LedFactory ledFactory) {
  48. SystemObject.ledFactory = ledFactory;
  49. }
  50. @Autowired
  51. void setCaptureFactory(CaptureFactory captureFactory) {
  52. SystemObject.captureFactory = captureFactory;
  53. }
  54. @Autowired
  55. void setCapturePropertiesConfig(CapturePropertiesConfig capturePropertiesConfig) {
  56. SystemObject.capturePropertiesConfig = capturePropertiesConfig;
  57. }
  58. }