DistributedSystemProperties.java 888 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. package com.kmall.admin.cuspay.config;
  2. import org.springframework.beans.factory.annotation.Value;
  3. import org.springframework.context.annotation.Configuration;
  4. import java.io.Serializable;
  5. /**
  6. * @author Scott Chen
  7. * @version 1.0
  8. * 2017-11-26 16:16
  9. */
  10. @Configuration
  11. //@ConfigurationProperties("ds")
  12. public class DistributedSystemProperties implements Serializable {
  13. private static final long serialVersionUID = 2933157544322298616L;
  14. // @Value("${workerId}")
  15. private long workerId;
  16. // @Value("${datacenterId}")
  17. private long datacenterId;
  18. public long getWorkerId() {
  19. return workerId;
  20. }
  21. public void setWorkerId(long workerId) {
  22. this.workerId = workerId;
  23. }
  24. public long getDatacenterId() {
  25. return datacenterId;
  26. }
  27. public void setDatacenterId(long datacenterId) {
  28. this.datacenterId = datacenterId;
  29. }
  30. }