You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

37 lines
1.3KB

  1. package com.telpo.iotgateway;
  2. import com.telpo.iotgateway.server.IotCommunication;
  3. import lombok.extern.slf4j.Slf4j;
  4. import org.springframework.boot.SpringApplication;
  5. import org.springframework.boot.autoconfigure.SpringBootApplication;
  6. import org.springframework.boot.context.properties.ConfigurationPropertiesScan;
  7. import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
  8. import org.springframework.context.ConfigurableApplicationContext;
  9. import org.springframework.core.env.ConfigurableEnvironment;
  10. import org.springframework.scheduling.annotation.EnableAsync;
  11. import org.springframework.scheduling.annotation.EnableScheduling;
  12. /**
  13. * @program: DataPushServer
  14. * @description: 推送服务启动程序
  15. * @author: linwl
  16. * @create: 2020-07-10 18:04
  17. */
  18. @SpringBootApplication
  19. @EnableDiscoveryClient
  20. @ConfigurationPropertiesScan
  21. @EnableAsync
  22. @EnableScheduling
  23. @Slf4j
  24. public class IotGatewayApplication {
  25. public static void main(String[] args) {
  26. ConfigurableApplicationContext applicationContext = SpringApplication.run(IotGatewayApplication.class, args);
  27. ConfigurableEnvironment environment = applicationContext.getEnvironment();
  28. IotCommunication iotCommunication = new IotCommunication(environment);
  29. iotCommunication.start();
  30. log.info("推送服务启动!");
  31. }
  32. }