Class ServicePropertiesModule

java.lang.Object
com.google.inject.AbstractModule
com.peterphi.std.guice.common.serviceprops.ServicePropertiesModule
All Implemented Interfaces:
com.google.inject.Module

public class ServicePropertiesModule extends com.google.inject.AbstractModule
Module that binds properties from PropertyFiles in the classpath (called service.properties by default)
The properties found in the PropertyFile object(s) are all exposed a String Named properties. A read-only composite PropertyFile is bound as the PropertyFile Named property "service.properties"
  • Field Details

    • configuration

      protected final GuiceConfig configuration
  • Constructor Details

    • ServicePropertiesModule

      public ServicePropertiesModule(PropertyFile properties)
      For unit tests only!
      Parameters:
      properties -
    • ServicePropertiesModule

      public ServicePropertiesModule(GuiceConfig configuration)
  • Method Details

    • configure

      protected void configure()
      Overrides:
      configure in class com.google.inject.AbstractModule
    • getConfiguration

      @Provides public GuiceConfig getConfiguration()