Move inner class to end of file for consistency
This commit is contained in:
parent
bd45d68a63
commit
fc841e0269
|
@ -76,25 +76,6 @@ public abstract class JpaBaseConfiguration implements BeanFactoryAware {
|
||||||
return entityManagerFactoryBean;
|
return entityManagerFactoryBean;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Configuration
|
|
||||||
@ConditionalOnWebApplication
|
|
||||||
@ConditionalOnMissingBean({ OpenEntityManagerInViewInterceptor.class,
|
|
||||||
OpenEntityManagerInViewFilter.class })
|
|
||||||
@ConditionalOnExpression("${spring.jpa.openInView:${spring.jpa.open_in_view:true}}")
|
|
||||||
protected static class JpaWebConfiguration extends WebMvcConfigurerAdapter {
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void addInterceptors(InterceptorRegistry registry) {
|
|
||||||
registry.addWebRequestInterceptor(openEntityManagerInViewInterceptor());
|
|
||||||
}
|
|
||||||
|
|
||||||
@Bean
|
|
||||||
public OpenEntityManagerInViewInterceptor openEntityManagerInViewInterceptor() {
|
|
||||||
return new OpenEntityManagerInViewInterceptor();
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Determines if the {@code dataSource} being used by Spring was created from
|
* Determines if the {@code dataSource} being used by Spring was created from
|
||||||
* {@link EmbeddedDatabaseConfiguration}.
|
* {@link EmbeddedDatabaseConfiguration}.
|
||||||
|
@ -141,4 +122,23 @@ public abstract class JpaBaseConfiguration implements BeanFactoryAware {
|
||||||
public void setBeanFactory(BeanFactory beanFactory) throws BeansException {
|
public void setBeanFactory(BeanFactory beanFactory) throws BeansException {
|
||||||
this.beanFactory = (ConfigurableListableBeanFactory) beanFactory;
|
this.beanFactory = (ConfigurableListableBeanFactory) beanFactory;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Configuration
|
||||||
|
@ConditionalOnWebApplication
|
||||||
|
@ConditionalOnMissingBean({ OpenEntityManagerInViewInterceptor.class,
|
||||||
|
OpenEntityManagerInViewFilter.class })
|
||||||
|
@ConditionalOnExpression("${spring.jpa.openInView:${spring.jpa.open_in_view:true}}")
|
||||||
|
protected static class JpaWebConfiguration extends WebMvcConfigurerAdapter {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void addInterceptors(InterceptorRegistry registry) {
|
||||||
|
registry.addWebRequestInterceptor(openEntityManagerInViewInterceptor());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Bean
|
||||||
|
public OpenEntityManagerInViewInterceptor openEntityManagerInViewInterceptor() {
|
||||||
|
return new OpenEntityManagerInViewInterceptor();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue