| | |
| | | import org.springframework.scheduling.annotation.EnableScheduling; |
| | | import org.springframework.web.client.RestTemplate; |
| | | |
| | | import javax.annotation.PostConstruct; |
| | | import java.nio.charset.StandardCharsets; |
| | | import java.util.TimeZone; |
| | | |
| | | /** |
| | | * SpringBoot方式启动类 |
| | |
| | | logger.info("GunsApplication is success!"); |
| | | } |
| | | |
| | | |
| | | @PostConstruct |
| | | void started() { |
| | | TimeZone.setDefault(TimeZone.getTimeZone("GMT+0")); |
| | | } |
| | | |
| | | |
| | | |
| | | @Bean //通过ip地址调用 |
| | | public RestTemplate restTemplate() { |
| | | PoolingHttpClientConnectionManager connectionManager = new PoolingHttpClientConnectionManager(); |