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
configurations { | |
newrelic | |
} | |
dependencies { | |
newrelic "com.newrelic.agent.java:newrelic-agent:${newrelicVersion}" | |
} | |
task newrelicJar(type: Copy) { | |
from { |
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 org.yaml.snakeyaml.DumperOptions | |
import org.yaml.snakeyaml.Yaml | |
apply plugin: 'groovy' | |
buildscript { | |
repositories { | |
jcenter() | |
} | |
dependencies { |
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
FROM busybox | |
# any thing after here will not be cached | |
# since Quay.IO check out will results in a different timestamp to the cache | |
ADD .git/HEAD /app/CACHE_BUSTER | |
RUN rm CACHE_BUSTER |
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 com.fasterxml.jackson.annotation.JsonProperty; | |
import java.time.LocalDate; | |
import java.time.LocalDateTime; | |
public class Dummy { | |
@JsonProperty | |
public LocalDate localDate; | |
@JsonProperty |
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 javax.inject.Singleton; | |
import javax.ws.rs.container.ContainerRequestContext; | |
import javax.ws.rs.container.ContainerResponseContext; | |
import javax.ws.rs.container.ContainerResponseFilter; | |
import javax.ws.rs.core.MultivaluedMap; | |
import javax.ws.rs.ext.Provider; | |
import java.io.IOException; | |
@Singleton | |
@Provider |
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 io.dropwizard.Application; | |
import io.dropwizard.Configuration; | |
import io.dropwizard.client.JerseyClientBuilder; | |
import io.dropwizard.setup.Environment; | |
import io.dropwizard.testing.junit.DropwizardAppRule; | |
import org.assertj.core.data.MapEntry; | |
import org.eclipse.jetty.servlets.CrossOriginFilter; | |
import org.junit.ClassRule; | |
import org.junit.Test; |
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
@GET | |
@Path("/update") | |
@UnitOfWork(transactional = false) | |
public World update(World world) { | |
return transactionDao.updatesWorld(world); | |
} |
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
private TrustManager[] loadTrustManagers(String certificateFile) throws KeyStoreException, CertificateException, NoSuchAlgorithmException, IOException { | |
KeyStore trustedCertStore = KeyStore.getInstance(KeyStore.getDefaultType()); | |
trustedCertStore.load(SecurityModule.class.getClassLoader().getResourceAsStream(), null); | |
TrustManagerFactory tmf = TrustManagerFactory.getInstance(TrustManagerFactory.getDefaultAlgorithm()); | |
tmf.init(trustedCertStore); | |
return tmf.getTrustManagers(); | |
} |
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
hello: | |
image: 'tutum/hello-world:latest' | |
environment: | |
- FORCE_SSL=yes | |
- 'VIRTUAL_HOST=http://hello.example.com, https://hello.example.com' | |
ports: | |
- '80' | |
web: | |
image: 'example/web-site:latest' | |
environment: |
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
install(new FactoryModuleBuilder().build(PayloadServiceFactory.class)); | |
public interface GenericPayloadFactory { | |
PayloadService<? extends Payload> create(); | |
} | |
public interface Payload {} | |
public class JsonPayload implements Payload {} | |
public class XmlPayload implements Payload {} |