• org.springframework.dao.InvalidDataAccessApiUsageException


    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.

    在appCtx-db.xml中配置了事务传播属性,<prop key="*">PROPAGATION_REQUIRED,readOnly</prop>

    使用符合规则的方法名则可以了

  • 相关阅读:
    编程学习杂烩
    设计模式
    redis
    H5
    Java
    db工具
    python + pip
    mysql
    Spring Security
    Spring Cloud Gateway
  • 原文地址:https://www.cnblogs.com/mySummer/p/4288365.html
Copyright © 2020-2023  润新知