package com.android.trisolarisserver.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 @Configuration class HttpConfig { @Bean fun restTemplate(): RestTemplate { val factory = SimpleClientHttpRequestFactory().apply { setConnectTimeout(10_000) setReadTimeout(5 * 60 * 1_000) } return RestTemplate(factory) } }