This file contains hidden or 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
location ~ ^/otm-proxy/(.*) { | |
resolver 8.8.8.8; | |
access_log /var/log/alfadart-prebid-server/otm.log prebid_server_otm_proxy; | |
proxy_pass https://ssp.otm-r.com/$1; | |
proxy_set_header Host ssp.otm-r.com; | |
} |
This file contains hidden or 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
package com.devadmin.utils.dropwizard; | |
import ch.qos.logback.classic.LoggerContext; | |
import ch.qos.logback.classic.util.ContextInitializer; | |
import ch.qos.logback.core.joran.spi.JoranException; | |
import com.codahale.metrics.MetricRegistry; | |
import com.fasterxml.jackson.annotation.JsonIgnore; | |
import io.dropwizard.logging.LoggingFactory; | |
import io.dropwizard.logging.LoggingUtil; |
This file contains hidden or 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
objectMapper.readValue(node, new TypeReference<Map<String, List<TagTranslation>>>() { | |
})) |
This file contains hidden or 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
this.order = to.list(JacksonUtils.fromJson(order, NabuOrderWithField[].class)); |
This file contains hidden or 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
<!-- http://stackoverflow.com/a/36707798 --> | |
<appender name="main" class="ch.qos.logback.core.rolling.RollingFileAppender"> | |
<file>/var/log/http-file-cache/cache.log</file> | |
<encoder> | |
<pattern>%d{HH:mm:ss.SSS} [%thread] [%X] %-5level %logger{36} - %msg%n</pattern> | |
</encoder> | |
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy"> | |
<fileNamePattern>/var/log/http-file-cache/cache.%d{yyyy-MM-dd}.%i.log.gz</fileNamePattern> | |
<maxFileSize>10MB</maxFileSize> | |
<maxHistory>30</maxHistory> |
This file contains hidden or 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 resource="applicationContext.log.db.${log.to.db:false}.xml"/> | |
//http://stackoverflow.com/questions/3035630/how-to-achieve-conditional-resource-import-in-a-spring-xml-context | |
private void loadConditionalProperties() { | |
try { | |
Properties properties = new Properties(); | |
try (InputStream stream = FileUtils.openInputStream(new File(getDefaultConfigPath()))) { | |
properties.load(stream); | |
} |
This file contains hidden or 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
package com.devadmin.ta.domain; | |
import javax.ws.rs.DefaultValue; | |
import javax.ws.rs.QueryParam; | |
/** | |
* Created by fbelov on 4/16/16. | |
*/ | |
public class QueryParamWithDefaultValueRequest { |
This file contains hidden or 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
@Component | |
@Provider | |
public class SiteWithParamsConverterProvider implements ParamConverterProvider { | |
@Autowired | |
private Converter converter; | |
@Override | |
public <T> ParamConverter<T> getConverter(Class<T> rawType, Type genericType, Annotation[] annotations) { | |
if (genericType.equals(SiteWithParams.class)) { |
This file contains hidden or 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
client = ClientBuilder.newClient(); | |
client.register(new LoggingFilter()); | |
client.property(ClientProperties.CONNECT_TIMEOUT, timeoutInMillis); | |
client.property(ClientProperties.READ_TIMEOUT, timeoutInMillis); |