@@ -0,0 +1,2335 @@
+package gs.teamup.bot.config;%0A%0Aimport org.springframework.context.annotation.Bean;%0Aimport org.springframework.context.annotation.Configuration;%0Aimport org.springframework.http.client.HttpComponentsClientHttpRequestFactory;%0Aimport org.springframework.http.converter.ByteArrayHttpMessageConverter;%0Aimport org.springframework.http.converter.FormHttpMessageConverter;%0Aimport org.springframework.http.converter.HttpMessageConverter;%0Aimport org.springframework.http.converter.StringHttpMessageConverter;%0Aimport org.springframework.http.converter.json.MappingJackson2HttpMessageConverter;%0Aimport org.springframework.web.client.RestOperations;%0Aimport org.springframework.web.client.RestTemplate;%0A%0Aimport java.nio.charset.Charset;%0Aimport java.util.ArrayList;%0Aimport java.util.List;%0A%0A/**%0A * Created by thisno on 2016-04-12.%0A */%0A@Configuration%0Apublic class RestTemplateConfig %7B%0A%0A    @Bean(name=%22eventRestTemplate%22)%0A    public RestTemplate eventRestTemplate() %7B%0A        HttpComponentsClientHttpRequestFactory factory = new HttpComponentsClientHttpRequestFactory();%0A        factory.setConnectTimeout(1000*2);%0A        factory.setReadTimeout(1000*30);%0A        return getRestTemplate(factory);%0A    %7D%0A%0A    @Bean(name=%22restTemplate%22)%0A    public RestTemplate restTemplate() %7B%0A        HttpComponentsClientHttpRequestFactory factory = new HttpComponentsClientHttpRequestFactory();%0A        factory.setConnectTimeout(1000*2);%0A        factory.setReadTimeout(1000*5);%0A        return getRestTemplate(factory);%0A    %7D%0A%0A    private RestTemplate getRestTemplate(HttpComponentsClientHttpRequestFactory httpComponentsClientHttpRequestFactory)%7B%0A        RestTemplate restTemplate = new RestTemplate(httpComponentsClientHttpRequestFactory);%0A        Charset charset = Charset.forName(%22UTF-8%22);%0A%0A        List%3CHttpMessageConverter%3C?%3E%3E converters = new ArrayList%3CHttpMessageConverter%3C?%3E%3E();%0A        converters.add(new StringHttpMessageConverter(charset));%0A        converters.add(new MappingJackson2HttpMessageConverter());%0A        converters.add(new ByteArrayHttpMessageConverter());%0A%0A        FormHttpMessageConverter formHttpMessageConverter = new FormHttpMessageConverter();%0A        formHttpMessageConverter.setCharset(charset);%0A        converters.add(formHttpMessageConverter);%0A%0A        restTemplate.setMessageConverters(converters);%0A        return restTemplate;%0A    %7D%0A%7D%0A

add rest