ModelingControlApplication.java 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. package com.fdkankan.contro;
  2. import com.dtflys.forest.springboot.annotation.ForestScan;
  3. import org.mybatis.spring.annotation.MapperScan;
  4. import org.springframework.boot.SpringApplication;
  5. import org.springframework.boot.autoconfigure.SpringBootApplication;
  6. import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
  7. import org.springframework.context.annotation.ComponentScan;
  8. import org.springframework.scheduling.annotation.EnableAsync;
  9. import org.springframework.scheduling.annotation.EnableScheduling;
  10. /**
  11. * <p>
  12. * </p>
  13. *
  14. * @author dengsixing
  15. * @since 2022/2/22
  16. **/
  17. @SpringBootApplication
  18. @EnableScheduling
  19. @ComponentScan(basePackages = {"com.fdkankan.*"})
  20. @EnableAsync
  21. @MapperScan("com.fdkankan.**.mapper")
  22. @EnableDiscoveryClient
  23. @ForestScan(basePackages = "com.fdkankan.contro.httpclient")
  24. public class ModelingControlApplication {
  25. public static void main(String[] args) {
  26. SpringApplication.run(ModelingControlApplication.class, args);
  27. // NSQLookup lookup = new DefaultNSQLookup();
  28. // lookup.addLookupAddress("192.168.0.127", 4161);
  29. // NSQConsumer consumer = new NSQConsumer(lookup, "topic-bd", "channel-bd", (message) -> {
  30. // System.out.println("received: " + message);
  31. // //now mark the message as finished.
  32. // message.finished();
  33. //
  34. // //or you could requeue it, which indicates a failure and puts it back on the queue.
  35. //// message.requeue();
  36. // });
  37. //
  38. // consumer.start();
  39. }
  40. }