001package io.ebean.config;
002
003import io.ebean.DatabaseFactory;
004
005/**
006 * Deprecated - please migrate to <code>io.ebean.DatabaseConfig</code>.
007 *
008 * The configuration used for creating a Database.
009 * <p>
010 * Used to programmatically construct a Database and optionally register it
011 * with the DB singleton.
012 * </p>
013 * <p>
014 * If you just use DB without this programmatic configuration DB will read
015 * the application.properties file and take the configuration from there. This usually
016 * includes searching the class path and automatically registering any entity
017 * classes and listeners etc.
018 * </p>
019 * <pre>{@code
020 *
021 * ServerConfig config = new ServerConfig();
022 *
023 * // read the ebean.properties and load
024 * // those settings into this serverConfig object
025 * config.loadFromProperties();
026 *
027 * // explicitly register the entity beans to avoid classpath scanning
028 * config.addClass(Customer.class);
029 * config.addClass(User.class);
030 *
031 * Database database = DatabaseFactory.create(config);
032 *
033 * }</pre>
034 *
035 * <p>
036 * Note that ServerConfigProvider provides a standard Java ServiceLoader mechanism that can
037 * be used to apply configuration to the ServerConfig.
038 * </p>
039 *
040 * @author emcgreal
041 * @author rbygrave
042 * @see DatabaseFactory
043 */
044@Deprecated
045public class ServerConfig extends DatabaseConfig {
046
047}