类 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.- 从以下版本开始:
- 1.1.0
嵌套类概要
嵌套类 修饰符和类型 类 说明 static class
JpaProperties.Hibernate
static class
JpaProperties.Naming
构造器概要
构造器 构造器 说明 JpaProperties()
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 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)
构造器详细资料
JpaProperties
public JpaProperties()
方法详细资料
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.- 参数:
dataSource
- the DataSource in case it is needed to determine the properties- 返回:
- 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
.- 参数:
dataSource
- the auto-configured data source- 返回:
Database