NerClientConfig.java 816 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. package com.lingyue.ai.config;
  2. import lombok.Data;
  3. import org.springframework.boot.context.properties.ConfigurationProperties;
  4. import org.springframework.context.annotation.Configuration;
  5. /**
  6. * NER 客户端配置
  7. *
  8. * @author lingyue
  9. * @since 2026-01-19
  10. */
  11. @Data
  12. @Configuration
  13. @ConfigurationProperties(prefix = "ner.python-service")
  14. public class NerClientConfig {
  15. /**
  16. * Python NER 服务地址
  17. */
  18. private String url = "http://localhost:8001";
  19. /**
  20. * 请求超时时间(毫秒)
  21. */
  22. private int timeout = 60000;
  23. /**
  24. * 连接超时时间(毫秒)
  25. */
  26. private int connectTimeout = 5000;
  27. /**
  28. * 最大重试次数
  29. */
  30. private int maxRetries = 3;
  31. /**
  32. * 重试间隔(毫秒)
  33. */
  34. private int retryInterval = 1000;
  35. }