0
点赞
收藏
分享

微信扫一扫

Turn your Session into FlushMode.COMMIT/AUTO or remove 'readOnly' marker from tr

org.springframework.dao.InvalidDataAccessApiUsageException: Write operations are not allowed in read-only mode (FlushMode.MANUAL): Turn your Session into FlushMode.COMMIT/AUTO or remove 'readOnly' marker from transaction definition.



<!--修改Hibernate配置如下: -->


<filter>


<filter-name>hibernateFilter</filter-name>


<filter-class>org.springframework.orm.hibernate3.support.OpenSessionInViewFilter</filter-class>


[color=red]

<init-param>
<param-name>flushModeparam-name>
<param-value>AUTOparam-value>
init-param>

[/color]


</filter>


<filter-mapping>


<filter-name>hibernateFilter</filter-name>


<url-pattern>/*</url-pattern>


</filter-mapping>


举报

相关推荐

0 条评论