MaxKeyConfig.java 578 B

1234567891011121314151617181920212223
  1. package org.maxkey;
  2. import org.springframework.beans.factory.annotation.Value;
  3. import org.springframework.context.annotation.Configuration;
  4. import org.springframework.context.annotation.ImportResource;
  5. import org.springframework.context.annotation.PropertySource;
  6. @Configuration
  7. @ImportResource(locations={"classpath:spring/maxkey.xml"})
  8. @PropertySource("classpath:/application.properties")
  9. public class MaxKeyConfig {
  10. @Value("${server.port:8080}")
  11. private int port;
  12. public int getPort() {
  13. return port;
  14. }
  15. public void setPort(int port) {
  16. this.port = port;
  17. }
  18. }