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 com.netflix.zuul.ZuulFilter; | |
import com.netflix.zuul.context.RequestContext; | |
import com.netflix.zuul.exception.ZuulException; | |
import static org.springframework.cloud.netflix.zuul.filters.support.FilterConstants.PRE_DECORATION_FILTER_ORDER; | |
import static org.springframework.cloud.netflix.zuul.filters.support.FilterConstants.PRE_TYPE; | |
import static org.springframework.cloud.netflix.zuul.filters.support.FilterConstants.PROXY_KEY; | |
/** | |
* Adds an API key in the form of a request header to proxied requests. |
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 brave.Span; | |
import brave.Tracer; | |
import brave.Tracing; | |
import brave.propagation.Propagation; | |
import brave.propagation.TraceContext; | |
import com.amazonaws.services.sqs.AmazonSQSAsync; | |
import io.micrometer.core.instrument.MeterRegistry; | |
import io.micrometer.core.instrument.Timer; | |
import org.springframework.cloud.aws.messaging.core.QueueMessageChannel; | |
import org.springframework.cloud.aws.messaging.core.QueueMessagingTemplate; |
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 com.netflix.loadbalancer.Server; | |
import com.netflix.loadbalancer.ServerList; | |
import org.slf4j.Logger; | |
import org.slf4j.LoggerFactory; | |
import java.net.InetAddress; | |
import java.net.UnknownHostException; | |
import java.security.Security; | |
import java.util.ArrayList; | |
import java.util.List; |
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, |
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.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.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.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
<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
<#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 |