Application.java 1.1 KB

123456789101112131415161718192021222324252627282930
  1. package com.tzld.videoVector;
  2. import org.slf4j.Logger;
  3. import org.slf4j.LoggerFactory;
  4. import org.springframework.boot.SpringApplication;
  5. import org.springframework.boot.autoconfigure.SpringBootApplication;
  6. import org.springframework.boot.web.servlet.ServletComponentScan;
  7. import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
  8. import org.springframework.cloud.openfeign.EnableFeignClients;
  9. /**
  10. * CORS 由 K8s Ingress / 阿里云 Tengine 网关统一处理,后端不再重复加 CORS 头,
  11. * 否则浏览器会因 Access-Control-Allow-Origin 出现多个值而拦截响应。
  12. *
  13. * @MapperScan 由各 DBConfig (PgVectorDBConfig / VideoVectorDBConfig) 分包配置,
  14. * 此处不再放全局 scan。
  15. */
  16. @SpringBootApplication
  17. @ServletComponentScan("com.tzld.videoVector.controller")
  18. @EnableDiscoveryClient
  19. @EnableFeignClients
  20. public class Application {
  21. private static final Logger LOGGER = LoggerFactory.getLogger(Application.class);
  22. public static void main(String[] args) {
  23. SpringApplication.run(Application.class, args);
  24. LOGGER.info("video-vector-server Start Success");
  25. }
  26. }