Write operations are not allowed in read-only错误

rg.springframework.scheduling.quartz.JobMethodInvocationFailedException: Invocation of method 'retrieveBirthdaySendSms' on target class [class $Proxy5] failed; nested exception is org.springframework.dao.InvalidDataAccessApiUsageException: Write operations are not allowed in read-only mode (FlushMode.NEVER/MANUAL): Turn your Session into FlushMode.COMMIT/AUTO or remove 'readOnly' marker from transaction definition.

今天提示这个错误,原因是spring配置了一个制度的事物,修改事物的级别就OK了

你可能感兴趣的:(DAO,spring,quartz)