Interface DatabaseConfigProvider


  • public interface DatabaseConfigProvider
    Provides a ServiceLoader based mechanism to configure a DatabaseConfig.

    Provide an implementation and register it via the standard Java ServiceLoader mechanism via a file at META-INF/services/io.ebean.config.DatabaseConfigProvider.

    If you are using a DI container like Spring or Guice you are unlikely to use this but instead use a spring specific configuration. When we are not using a DI container we may use this mechanism to explicitly register the entity beans and avoid classpath scanning.

    {@code
    
     public class EbeanConfigProvider implements DatabaseConfigProvider {
    • Method Detail

      • apply

        void apply​(DatabaseConfig config)
        Apply the configuration to the DatabaseConfig.

        Typically we explicitly register entity bean classes and thus avoid classpath scanning.