@Configuration @EnableTransactionManagement(proxyTargetClass=true) @EnableAspectJAutoProxy(proxyTargetClass=true) @Lazy public class HibernateConfig extends Object implements org.springframework.context.EnvironmentAware
| 限定符和类型 | 字段和说明 |
|---|---|
protected org.springframework.core.env.Environment |
env |
| 构造器和说明 |
|---|
HibernateConfig() |
| 限定符和类型 | 方法和说明 |
|---|---|
org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor |
autowiredAnnotationBeanPostProcessor() |
org.springframework.dao.annotation.PersistenceExceptionTranslationPostProcessor |
persistenceExceptionTranslationPostProcessor() |
static void |
registerOpenSessionInViewFilter(javax.servlet.ServletContext servletContext)
注册OpenSessionInViewFilter 过滤器
|
org.springframework.orm.hibernate5.LocalSessionFactoryBean |
sessionFactory(DataSource dataSource) |
void |
setEnvironment(org.springframework.core.env.Environment environment) |
org.springframework.orm.hibernate5.HibernateTransactionManager |
transactionManager(org.hibernate.SessionFactory sessionFactory) |
public void setEnvironment(org.springframework.core.env.Environment environment)
setEnvironment 在接口中 org.springframework.context.EnvironmentAware@Bean
public org.springframework.orm.hibernate5.LocalSessionFactoryBean sessionFactory(@Autowired
DataSource dataSource)
@Bean
@DependsOn(value="flyway")
public org.springframework.orm.hibernate5.HibernateTransactionManager transactionManager(@Autowired
org.hibernate.SessionFactory sessionFactory)
@Bean public org.springframework.dao.annotation.PersistenceExceptionTranslationPostProcessor persistenceExceptionTranslationPostProcessor()
@Bean public org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor autowiredAnnotationBeanPostProcessor()
public static void registerOpenSessionInViewFilter(javax.servlet.ServletContext servletContext)
servletContext - ServletContextCopyright © 2017 江苏南大先腾信息产业股份有限公司. All rights reserved.