Package org.fcrepo.config
Class DatabaseConfig
- java.lang.Object
-
- org.fcrepo.config.DatabaseConfig
-
@EnableTransactionManagement @Configuration public class DatabaseConfig extends Object
- Author:
- pwinckles
-
-
Field Summary
Fields Modifier and Type Field Description static String
DEFAULT_FCREPO_CONFIG_FILE_PROP_SOURCE
static String
DEFAULT_FCREPO_HOME_VALUE
static String
FCREPO_CONFIG_FILE_PROP_SOURCE
static String
FCREPO_HOME_PROPERTY
-
Constructor Summary
Constructors Constructor Description DatabaseConfig()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected Path
createDirectories(Path path)
DataSource
dataSource()
org.flywaydb.core.Flyway
flyway(DataSource source)
void
setup()
org.springframework.jdbc.datasource.DataSourceTransactionManager
txManager(DataSource dataSource)
org.springframework.transaction.support.TransactionTemplate
txTemplate(org.springframework.transaction.PlatformTransactionManager txManager)
-
-
-
Field Detail
-
FCREPO_HOME_PROPERTY
public static final String FCREPO_HOME_PROPERTY
- See Also:
- Constant Field Values
-
DEFAULT_FCREPO_HOME_VALUE
public static final String DEFAULT_FCREPO_HOME_VALUE
- See Also:
- Constant Field Values
-
DEFAULT_FCREPO_CONFIG_FILE_PROP_SOURCE
public static final String DEFAULT_FCREPO_CONFIG_FILE_PROP_SOURCE
- See Also:
- Constant Field Values
-
FCREPO_CONFIG_FILE_PROP_SOURCE
public static final String FCREPO_CONFIG_FILE_PROP_SOURCE
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
DatabaseConfig
public DatabaseConfig()
-
-
Method Detail
-
setup
@PostConstruct public void setup()
-
dataSource
@Bean public DataSource dataSource() throws Exception
- Throws:
Exception
-
txManager
@Bean public org.springframework.jdbc.datasource.DataSourceTransactionManager txManager(DataSource dataSource)
-
txTemplate
@Bean public org.springframework.transaction.support.TransactionTemplate txTemplate(org.springframework.transaction.PlatformTransactionManager txManager)
-
flyway
@Bean public org.flywaydb.core.Flyway flyway(DataSource source) throws Exception
- Throws:
Exception
-
createDirectories
protected Path createDirectories(Path path) throws IOException
- Throws:
IOException
-
-