could not initialize proxy - no Session

could not initialize proxy - no Session
在web.xml文件中加入
<filter>
        <filter-name>lazyLoadingFilter</filter-name>
        <filter-class>
            org.springframework.orm.hibernate3.support.OpenSessionInViewFilter
        </filter-class>
    </filter>
<filter-mapping>
    <filter-name>lazyLoadingFilter</filter-name>
    <url-pattern>*.action</url-pattern>
</filter-mapping>
在映射文件(*.hbm.xml)中<class >加入lazy="false"

你可能感兴趣的:(session)