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
buildscript { | |
repositories { | |
jcenter() | |
} | |
dependencies { | |
classpath 'com.github.jengelman.gradle.plugins:shadow:1.1.2' | |
} | |
} | |
apply plugin: 'maven' |
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
public abstract class JdbiIntegrationTest { | |
protected DBI dbi; | |
private Handle handle; | |
private Liquibase liquibase; | |
protected abstract DataSourceFactory getDataSourceFactory(); |
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
public abstract class JdbiUnitTest { | |
protected DBI dbi; | |
private Handle handle; | |
private Liquibase liquibase; | |
protected abstract void setUpDataAccessObjects(); |
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
// Bridge all Guice injection from AppServletContextListener | |
GuiceBridge.getGuiceBridge().initializeGuiceBridge( serviceLocator ); | |
GuiceIntoHK2Bridge guiceBridge = serviceLocator.getService( GuiceIntoHK2Bridge.class ); | |
guiceBridge.bridgeGuiceInjector( injector ); |
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
@Override | |
public void initialize( final Bootstrap<PlatformConfiguration> bootstrap ) { | |
final GuiceBundle<PlatformConfiguration> guiceBundle = GuiceBundle.<PlatformConfiguration>newBuilder() | |
.addModule( new PlatformModule() ) | |
.enableAutoConfig( "com.apmasphere.platform.resources", "com.apmasphere.platform.health" ) | |
.setConfigClass( PlatformConfiguration.class ) | |
.setInjectorFactory( new GovernatorInjectorFactory() ) | |
.build(); | |
bootstrap.addBundle( guiceBundle ); | |
} |
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
public class ApplicationConfiguration extends Configuration implements AssetsBundleConfiguration { | |
@Valid | |
@NotNull | |
@JsonProperty | |
private AssetsConfiguration assets; | |
@Override | |
public AssetsConfiguration getAssets() { | |
return assets; | |
} |
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
publishing { | |
publications { | |
mavenJava(MavenPublication) { | |
pom.withXml { | |
asNode().dependencies.'*'.findAll() { | |
it.scope.text() == 'runtime' && project.configurations.compile.allDependencies.find { dep -> | |
dep.name == it.artifactId.text() | |
} | |
}.each() { | |
it.scope*.value = 'compile' |
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
public class MultiTenantDataSource implements ManagedDataSource { | |
private final ManagedDataSource managedDataSource; | |
private final SchemaResolver schemaResolver; | |
public MultiTenantDataSource( final ManagedDataSource managedDataSource, final SchemaResolver schemaResolver ) | |
{ | |
this.managedDataSource = managedDataSource; | |
this.schemaResolver = schemaResolver; | |
} |
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
@Singleton | |
@javax.ws.rs.ext.Provider | |
public class NewRelicTimedApplicationListener implements ApplicationEventListener { | |
private Map<Method,String> methodMap = new HashMap<>(); | |
@Override | |
public void onEvent(ApplicationEvent event) { | |
if (event.getType() == ApplicationEvent.Type.INITIALIZATION_APP_FINISHED) { | |
for (Resource resource : event.getResourceModel().getResources()) { |
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
errordeveloper/oracle-jre | |
WORKDIR /app/ | |
ADD app-config.yml /app/ | |
ADD build/app.jar /app/ | |
# port and run | |
EXPOSE 9090 | |
ENTRYPOINT [ "java" ] | |
CMD [ "-jar", "app.jar", "server", "app-config.yml" ] |
OlderNewer