how to configure DispatcherServlet and ContextLoaderListener in order to give way to OpenViewInSessionFilter

前端 未结 1 408

I\'ve been have some issues with my transaction manager using spring 3.0.5 and hibernate 3.6.1. After finding out that i needed an OpenViewInSessionFilter in a post

相关标签:
1条回答
  • 2021-01-28 13:19

    You shouldn't put the configuration in web.xml, just in applicationContext.xml. Next of the viewResolver (I put next to it), include the code:

    <mvc:interceptors>
        <bean id="openSessionInViewInterceptor" 
                  class="org.springframework.orm.hibernate3.support.OpenSessionInViewInterceptor">
            <property name="sessionFactory" ref="sessionFactory" />
        </bean>
    </mvc:interceptors>
    
    0 讨论(0)
提交回复
热议问题