This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import groovy.util.XmlSlurper; | |
import groovy.util.slurpersupport.GPathResult; | |
import java.util.List; | |
import java.util.Properties; | |
import javax.xml.transform.Source; | |
import javax.xml.transform.sax.SAXResult; | |
import org.springframework.beans.factory.NoSuchBeanDefinitionException; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
HttpComponentsClientHttpRequestFactory factory = new HttpComponentsClientHttpRequestFactory(); | |
DefaultHttpClient client = (DefaultHttpClient) factory.getHttpClient(); | |
client.getCredentialsProvider().setCredentials( | |
new AuthScope(hostName, portNumber), | |
new UsernamePasswordCredentials(username, password)); | |
RestTemplate restTemplate = new RestTemplate(factory); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<#ftl strip_whitespace=true> | |
<#import "spring.ftl" as spring /> | |
<#-- This file contains form-related macros for use in the other Freemarker template files. | |
The generated HTML is intended for use with Twitter Bootstrap based forms. --> | |
<#-- | |
* radioButtons | |
* | |
* @param path the name of the field to bind to |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<mvc:annotation-driven conversion-service="conversionService" ignoreDefaultModelOnRedirect="true"> | |
<mvc:argument-resolvers> | |
<bean class="org.springframework.data.web.PageableArgumentResolver"/> | |
</mvc:argument-resolvers> | |
</mvc:annotation-driven> | |
<bean class="org.springframework.data.repository.support.DomainClassConverter"> | |
<constructor-arg ref="conversionService"/> | |
</bean> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import org.apache.commons.httpclient.ConnectTimeoutException; | |
import org.apache.commons.httpclient.params.HttpConnectionParams; | |
import org.apache.commons.httpclient.protocol.Protocol; | |
import org.apache.commons.httpclient.protocol.ProtocolSocketFactory; | |
import org.apache.commons.httpclient.protocol.ReflectionSocketFactory; | |
import org.apache.commons.httpclient.protocol.SSLProtocolSocketFactory; | |
import org.slf4j.Logger; | |
import org.slf4j.LoggerFactory; | |
import sun.security.ssl.SSLSocketImpl; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import org.slf4j.Logger; | |
import org.slf4j.LoggerFactory; | |
import org.springframework.http.HttpHeaders; | |
import org.springframework.http.HttpRequest; | |
import org.springframework.http.MediaType; | |
import org.springframework.http.client.ClientHttpRequestExecution; | |
import org.springframework.http.client.ClientHttpRequestInterceptor; | |
import org.springframework.http.client.ClientHttpResponse; | |
import org.springframework.util.StreamUtils; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import org.springframework.boot.web.servlet.error.DefaultErrorAttributes; | |
import org.springframework.context.MessageSource; | |
import org.springframework.validation.FieldError; | |
import org.springframework.validation.ObjectError; | |
import org.springframework.web.context.request.WebRequest; | |
import java.util.ArrayList; | |
import java.util.List; | |
import java.util.Locale; | |
import java.util.Map; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import org.apache.http.client.HttpClient; | |
import org.apache.http.client.config.CookieSpecs; | |
import org.apache.http.client.config.RequestConfig; | |
import org.apache.http.impl.client.CloseableHttpClient; | |
import org.apache.http.impl.client.HttpClients; | |
import org.apache.http.impl.conn.PoolingHttpClientConnectionManager; | |
import org.springframework.beans.factory.annotation.Autowired; | |
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean; | |
import org.springframework.boot.context.properties.EnableConfigurationProperties; | |
import org.springframework.boot.web.client.RestTemplateCustomizer; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import org.springframework.boot.context.properties.ConfigurationProperties; | |
@ConfigurationProperties("http.client") | |
public class HttpClientProperties { | |
private int connectionTimeoutInMillis = 1_000; | |
private int readTimeoutInMillis = 10_000; | |
/** Used to configure both the default max per route as well as the maximum total connections. */ | |
private int maxConnections = 200; | |
/** | |
* Configures a LoggingClientHttpRequestInterceptor and a BufferingClientHttpRequestFactory, |
OlderNewer