All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.ebean.config.ServerConfigProvider Maven / Gradle / Ivy

There is a newer version: 15.8.1
Show newest version
package io.ebean.config;

/**
 * Provides a ServiceLoader based mechanism to configure a ServerConfig.
 * 

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

*

* 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 ServerConfigProvider {
 *
 *   @Override
 *   public void apply(ServerConfig config) {
 *
 *     // register the entity bean classes explicitly
 *     config.addClass(Customer.class);
 *     config.addClass(User.class);
 *     ...
 *   }
 * }
 *
 * }
*/ public interface ServerConfigProvider { /** * Apply the configuration to the ServerConfig. *

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

*/ void apply(ServerConfig config); }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy