28 lines
810 B
Java
28 lines
810 B
Java
package com.klp.common.config;
|
|
|
|
import org.springframework.context.annotation.Bean;
|
|
import org.springframework.context.annotation.Configuration;
|
|
import org.springframework.http.client.SimpleClientHttpRequestFactory;
|
|
import org.springframework.web.client.RestTemplate;
|
|
|
|
/**
|
|
* 销售话术生成器配置类
|
|
*
|
|
* @author klp
|
|
* @date 2025-01-27
|
|
*/
|
|
@Configuration
|
|
public class SalesScriptConfig {
|
|
|
|
/**
|
|
* 配置RestTemplate用于AI API调用
|
|
*/
|
|
@Bean("salesScriptRestTemplate")
|
|
public RestTemplate salesScriptRestTemplate() {
|
|
SimpleClientHttpRequestFactory factory = new SimpleClientHttpRequestFactory();
|
|
factory.setConnectTimeout(30000); // 30秒连接超时
|
|
factory.setReadTimeout(60000); // 60秒读取超时
|
|
return new RestTemplate(factory);
|
|
}
|
|
}
|