传统项目 升级到 spring boot 配置 org.springframework.orm.hibernate5.support.OpenSessionInViewFilter
2021-03-23 04:25
标签:hiberna cte get set ONBUILD send vat ida ash OpenSessionInViewFilter (Spring Framework 5.2.9.RELEASE API) OpenSessionInViewInterceptor (Spring Framework 5.2.9.RELEASE API) org.springframework.orm.hibernate5.support (Spring Framework 5.2.9.RELEASE API) OpenSessionInViewFilter (Spring Framework API 2.5) @SpringBootApplication(exclude = { DataSourceAutoConfiguration.class,DataSourceTransactionManagerAutoConfiguration.class,JdbcTemplateAutoConfiguration.class, // @Override 参考了如下代码: 传统项目 升级到 spring boot 配置 org.springframework.orm.hibernate5.support.OpenSessionInViewFilter 标签:hiberna cte get set ONBUILD send vat ida ash 原文地址:https://www.cnblogs.com/rgqancy/p/13856607.html
https://docs.spring.io/spring-framework/docs/current/javadoc-api/org/springframework/orm/hibernate5/support/OpenSessionInViewFilter.html
https://docs.spring.io/spring-framework/docs/current/javadoc-api/org/springframework/orm/hibernate5/support/OpenSessionInViewInterceptor.html
https://docs.spring.io/spring-framework/docs/current/javadoc-api/org/springframework/orm/hibernate5/support/package-summary.html
https://docs.spring.io/spring-framework/docs/2.5.4/javadoc-api/org/springframework/orm/hibernate3/support/OpenSessionInViewFilter.html
FreeMarkerAutoConfiguration.class,ValidationAutoConfiguration.class,ServerPropertiesAutoConfiguration.class,MailSenderAutoConfiguration.class})
public class CrmApplication
{
public static void main(String[] args) {
SpringApplication.run(CrmApplication.class, args);
//configureApplication(new SpringApplicationBuilder()).run(args);
}
// protected SpringApplicationBuilder configure(SpringApplicationBuilder builder) {
// return configureApplication(builder);
// }@Bean
public FilterRegistrationBean getHibernateOpenSessionInViewFilter() {
FilterRegistrationBean hibernateOpenSessionInViewFilterRegistrationBean = new FilterRegistrationBean();
hibernateOpenSessionInViewFilterRegistrationBean.setFilter(new OpenSessionInViewFilter());
hibernateOpenSessionInViewFilterRegistrationBean.setEnabled(true);
hibernateOpenSessionInViewFilterRegistrationBean.addUrlPatterns("*.do");
hibernateOpenSessionInViewFilterRegistrationBean.addUrlPatterns("/rest/*");
hibernateOpenSessionInViewFilterRegistrationBean.setInitParameters(new HashMap
hibernate - Using Spring Boot and Data JPA, getting LazyInitializationException despite the OpenSesionInViewFilter - Stack Overflow
https://stackoverflow.com/questions/36979281/using-spring-boot-and-data-jpa-getting-lazyinitializationexception-despite-the
下一篇:多线程中锁的释放问题
文章标题:传统项目 升级到 spring boot 配置 org.springframework.orm.hibernate5.support.OpenSessionInViewFilter
文章链接:http://soscw.com/index.php/essay/67752.html