zoukankan      html  css  js  c++  java
  • Write operations are not allowed in read-only mode (FlushMode.NEVER/MANUAL): Turn your Session into FlushMode.COMMIT/AUTO or remove 'readOnl

    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.

    错误解决办法:

     <filter-name>OpenSessionInViewFilter</filter-name>
       <filter-class>
        org.springframework.orm.hibernate3.support.OpenSessionInViewFilter
       </filter-class>
       <init-param>
        <param-name>sessionFactoryBeanName</param-name>
        <param-value>sessionFactory</param-value>
       </init-param>
       <init-param>
                <param-name>singleSession</param-name>
                <param-value>true</param-value>           
            </init-param>
            <init-param>
            <param-name> flushMode </param-name>
       <param-value>AUTO </param-value>        
            </init-param>
    </filter>

  • 相关阅读:
    python基础(str,list,tuple)
    MySQL数据类型概念
    Ubuntu安装sublime
    Ubuntu安装pycharm
    ubuntu安装mysql
    微信小程序注册开发流程
    新开篇
    被玩坏了的题——马的遍历
    一道数学恶心题——小凯的疑惑
    搜索基础题:八皇后
  • 原文地址:https://www.cnblogs.com/oymx/p/3946292.html
Copyright © 2011-2022 走看看