Class JpaProperties
- java.lang.Object
- org.springframework.boot.autoconfigure.orm.jpa.JpaProperties
@ConfigurationProperties(prefix="spring.jpa") public class JpaProperties extends Object
External configuration properties for a JPA EntityManagerFactory created by Spring.- Since:
- 1.1.0
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
JpaProperties.Hibernate
static class
JpaProperties.Naming
Constructor Summary
Constructors Constructor Description JpaProperties()
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.springframework.orm.jpa.vendor.Database
determineDatabase(DataSource dataSource)
Determine theDatabase
to use based on this configuration and the primaryDataSource
.org.springframework.orm.jpa.vendor.Database
getDatabase()
String
getDatabasePlatform()
JpaProperties.Hibernate
getHibernate()
Map<String,String>
getHibernateProperties(DataSource dataSource)
Get configuration properties for the initialization of the main Hibernate EntityManagerFactory.Map<String,String>
getProperties()
boolean
isGenerateDdl()
boolean
isShowSql()
void
setDatabase(org.springframework.orm.jpa.vendor.Database database)
void
setDatabasePlatform(String databasePlatform)
void
setGenerateDdl(boolean generateDdl)
void
setHibernate(JpaProperties.Hibernate hibernate)
void
setProperties(Map<String,String> properties)
void
setShowSql(boolean showSql)
Constructor Detail
JpaProperties
public JpaProperties()
Method Detail
getProperties
public Map<String,String> getProperties()
setProperties
public void setProperties(Map<String,String> properties)
getDatabasePlatform
public String getDatabasePlatform()
setDatabasePlatform
public void setDatabasePlatform(String databasePlatform)
getDatabase
public org.springframework.orm.jpa.vendor.Database getDatabase()
setDatabase
public void setDatabase(org.springframework.orm.jpa.vendor.Database database)
isGenerateDdl
public boolean isGenerateDdl()
setGenerateDdl
public void setGenerateDdl(boolean generateDdl)
isShowSql
public boolean isShowSql()
setShowSql
public void setShowSql(boolean showSql)
getHibernate
public JpaProperties.Hibernate getHibernate()
setHibernate
public void setHibernate(JpaProperties.Hibernate hibernate)
getHibernateProperties
public Map<String,String> getHibernateProperties(DataSource dataSource)
Get configuration properties for the initialization of the main Hibernate EntityManagerFactory.- Parameters:
dataSource
- the DataSource in case it is needed to determine the properties- Returns:
- some Hibernate properties for configuration
determineDatabase
public org.springframework.orm.jpa.vendor.Database determineDatabase(DataSource dataSource)
Determine theDatabase
to use based on this configuration and the primaryDataSource
.- Parameters:
dataSource
- the auto-configured data source- Returns:
Database