小弟刚学ssh没多久,做一个ssh的小运用当热手,但是使用spring管理事务之后,批量操作删除的时候,却报错:ERROR - Servlet.service() for servlet default threw exception
org.springframework.dao.InvalidDataAccessApiUsageException: Write operations are not allowed in read-only mode (FlushMode.NEVER) - turn your Session into FlushMode.AUTO or remove 'readOnly' er from transaction definition在网上搜了下,发现应该改spring的getsession()和closesession()方法才行,但是spring的源码却找不到在哪个位置.
我应该怎么做呢,请大家指教?不胜感激!!!
org.springframework.dao.InvalidDataAccessApiUsageException: Write operations are not allowed in read-only mode (FlushMode.NEVER) - turn your Session into FlushMode.AUTO or remove 'readOnly' er from transaction definition在网上搜了下,发现应该改spring的getsession()和closesession()方法才行,但是spring的源码却找不到在哪个位置.
我应该怎么做呢,请大家指教?不胜感激!!!
楼主我晕。 如果这种小问题都要去改Spring的源码, Spring早就没人用了。
'readOnly' 的属性。