KafkaProducer.java 1.0 KB

12345678910111213141516171819202122232425262728
  1. package com.tsf.kafka.producer;
  2. import com.tencent.tsf.monitor.annotation.EnableTsfMonitor;
  3. import com.tencent.tsf.sleuth.annotation.EnableTsfSleuth;
  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.cloud.openfeign.EnableFeignClients;
  8. import org.springframework.cloud.tsf.route.annotation.EnableTsfRoute;
  9. import org.springframework.scheduling.annotation.EnableScheduling;
  10. import org.springframework.tsf.auth.annotation.EnableTsfAuth;
  11. import org.springframework.tsf.ratelimit.annotation.EnableTsfRateLimit;
  12. @SpringBootApplication
  13. @EnableDiscoveryClient // 使用服务注册发现时请启用
  14. @EnableFeignClients // 使用Feign微服务调用时请启用
  15. @EnableScheduling
  16. @EnableTsfAuth
  17. @EnableTsfRoute
  18. @EnableTsfRateLimit
  19. @EnableTsfSleuth
  20. @EnableTsfMonitor
  21. public class KafkaProducer {
  22. public static void main(String[] args) {
  23. SpringApplication.run(KafkaProducer.class, args);
  24. }
  25. }