001package com.avaje.ebean.config; 002 003/** 004 * Configuration for the DB migration processing. 005 */ 006public class DbMigrationConfig { 007 008 /** 009 * Resource path for the migration xml and sql. 010 * Typically you would change 'app' to be a better/more unique. 011 */ 012 private String resourcePath = "dbmigration/app"; 013 014 /** 015 * Return the resource path for db migrations. 016 */ 017 public String getResourcePath() { 018 return resourcePath; 019 } 020 021 /** 022 * Set the resource path for db migrations. 023 * <p> 024 * Typically this would be something like "dbmigration/myapp" where myapp gives it a 025 * unique resource path in the case there are multiple EbeanServer applications in the 026 * single classpath. 027 * </p> 028 */ 029 public void setResourcePath(String resourcePath) { 030 this.resourcePath = resourcePath; 031 } 032 033 /** 034 * Load the settings from the PropertiesWrapper. 035 */ 036 public void loadSettings(PropertiesWrapper properties) { 037 resourcePath = properties.get("migration.resourcePath", resourcePath); 038 } 039}