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>flushMode</param-name>
	     <param-value>AUTO</param-value>
	</init-param>
[/color]
    </filter>
<filter-mapping>
<filter-name>hibernateFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>

你可能感兴趣的:(readOnly)