在學習ssh整合的時候,報錯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.protected void checkWriteOperationAllowed(Session session) throws InvalidDataAccessApiUsageException { if (isCheckWriteOperations() && session.getFlushMode().lessThan(FlushMode.COMMIT)) { throw new 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."); } }這個FlushMode為什么會默認是MANUAL,怎么修改呢?
添加回答
舉報
0/150
提交
取消