Hibernate批量删除出现sql异常Connection is read-only. Queries leading ... are not allowed

来源:互联网 发布:乐视re软件 编辑:程序博客网 时间:2024/06/05 19:37
在做批量删除时出现:
Connection is read-only. Queries leading to data modification are not allowed
检查代码,没有问题!
忽然想到spring配置文件上,是只读的!
<props>        <prop key="create*">PROPAGATION_REQUIRED,-com.worthtech.app.exception.SCException</prop>        <prop key="save*">PROPAGATION_REQUIRED,-com.worthtech.app.exception.SCException</prop>        <prop key="add*">PROPAGATION_REQUIRED,-com.worthtech.app.exception.SCException</prop>        <prop key="remove*">PROPAGATION_REQUIRED,-com.worthtech.app.exception.SCException</prop>        <prop key="update*">PROPAGATION_REQUIRED,-com.worthtech.app.exception.SCException</prop>        <prop key="del*">PROPAGATION_REQUIRED,-com.worthtech.app.exception.SCException</prop>        <prop key="*">PROPAGATION_REQUIRED,readOnly</prop>      </props>

把readOnly去掉就可以了
0 0
原创粉丝点击