`

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

阅读更多
在做批量删除时出现:
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去掉就可以了
分享到:
评论

相关推荐

    cors-filter-1.7.jar,cors-filter-2.5.jar,cors-filter-2.10.jar

    &lt;param-name&gt;cors.allowed.origins&lt;/param-name&gt; &lt;param-value&gt;*&lt;/param-value&gt; &lt;/init-param&gt; &lt;init-param&gt; &lt;param-name&gt;cors.allowed.methods&lt;/param-name&gt; &lt;param-value&gt;GET,POST,HEAD,OPTIONS&lt;/param-...

    cors-filter-1.7.jar,java-property-utils-1.9.jar

    &lt;param-name&gt;cors.allowed.origins&lt;/param-name&gt; &lt;param-value&gt;*&lt;/param-value&gt; &lt;/init-param&gt; &lt;init-param&gt; &lt;param-name&gt;cors.allowed.methods&lt;/param-name&gt; &lt;param-value&gt;GET,POST,HEAD,OPTIONS,PUT,DELETE...

    Tomcat解决跨域的两个jar包java-property-utils-1.9.jar和cors-filter-1.7.jar

    allowed.headers=Content-Type, Authorization, X-Requested-With allow.credentials=true exposed.headers=X-Total-Count, X-Custom-Header ``` 这里,`allowed.origins`指定了允许跨域的源,`allowed.methods...

    net55-r8168-8.045a-napi.x86_64.rar

    Requires MaintMode Live Install Allowed Live Remove Allowed Stateless Ready Overlay Yes No No Yes No History 2018-04-16: Version 8.045a: Changed package metadata to include proper dependencies and ...

    cors-filter-1.7.jar spring解决跨域问题 java

    String allowedOrigins = props.getProperty("cors.allowed.origins"); ``` 总结: Spring框架提供了多种解决跨域问题的方法,包括注解和过滤器。`cors-filter-1.7.jar`是一个非Spring的CORS过滤器,可以单独或与...

    hibernate-shards.jar

    of this license document, but changing it is not allowed. [This is the first released version of the Lesser GPL. It also counts as the successor of the GNU Library Public License, version 2, hence ...

    解决Tomcat跨域的jar包,java-property-utils-1.9.jar

    &lt;param-name&gt;cors.allowed.origins&lt;/param-name&gt; &lt;param-value&gt;*&lt;/param-value&gt; &lt;/init-param&gt; &lt;!-- 更多配置选项,如:允许的HTTP方法、允许的头部、是否允许证书等 --&gt; &lt;filter-mapping&gt; &lt;filter-name&gt;...

    springmodules-cache.xsd&springmodules-ehcache.xsd.rar

    xml/ns/javaee":deferred-syntax-allowed-as-literal, "http://java.sun.com/xml/ns/javaee":trim-directive-whitespaces, "http://java.sun.com/xml/ns/javaee":default-content-type, ...

    前端项目-jquery.allowed-chars.zip

    前端项目-jquery.allowed-chars,jQuery plugin to restrict users for typing only allowed chars for specified element

    webgoat-standalone-7.1-SNAPSHOT-exec.jar

    Prerequisites: Java VM 1.8 Open a command shell/window, browse to where you ...Using the --help option will show the allowed command line arguments. 更多查看: https://github.com/WebGoat/WebGoat

    nrpe-2.15.tar.gz

    4. **警报通知** - 当系统出现异常时,能发送邮件、短信或通过其他方式通知管理员。 **NRPE扩展功能:** 1. **远程执行插件** - NRPE允许Nagios服务器在远程主机上运行插件,获取更丰富的监控数据。 2. **安全性...

    sciter-sdk-4.0.0.7

    root element is allowed to have non-zero borders and paddings. fix of event.target in "contentchange" notification generation. NOTE: Windows executables in SDK are not signed so you may encounter ...

    PyPI 官网下载 | aws-cdk.aws-cloudfront-origins-1.97.0.tar.gz

    "allowed_methods": cloudfront.AllowedMethods.ALLOW_ALL, "cached_methods": cloudfront.CachedMethods.CACHE_GET_HEAD_OPTIONS, "default_ttl": core.Duration.minutes(5), }, ) ``` 在上面的例子中,我们...

    QT 下载:Download from your IP address is not allowed

    Download from your IP address is not allowed 百度网盘永久连接: QT下载: qt-opensource-linux-x64-5.8.0.run: 链接:https://pan.baidu.com/s/1sQ3tqPaWdDnmhBYAc_XR7g qt-opensource-linux-x64-5.13.1....

    net-e1000e-3.1.0.2-glr2.x86_64.rar

    Requires MaintMode Live Install Allowed Live Remove Allowed Stateless Ready Overlay Yes No No Yes No Additional links Related VMware Forum's post Package updated to include missing device IDs 1502...

    net-tulip-1.1.15-1.x86_64.rar

    Requires MaintMode Live Install Allowed Live Remove Allowed Stateless Ready Overlay Yes No No Yes No Additional links VMware Communities thread about running VMware ESXi inside Hyper-V Build ...

    Ethercat-Ighmaster.txt

    to select, ranges are allowed. Examples: '1,3', '5-7,9', '-3'. Default: '-' (all). --force -f Force a command. --quiet -q Output less information. --verbose -v ...

    cors-filter-1.7 + java-property-utils-1.10.zip

    - `cors.allowed.headers`:允许的请求头部,默认为Accept、Accept-Language、Content-Type、Last-Event-ID。 - `cors.exposed.headers`:服务器可以向浏览器暴露的响应头部。 - `cors.support.credentials`:是否...

    Python库 | VWS_Auth_Tools-2021.11.5.0-py3-none-any.whl

    is_allowed = authorize(user, 'read', 'document_id') if is_allowed: # 执行受保护的操作 else: # 处理权限不足的情况 ``` 总的来说,VWS_Auth_Tools库为Python开发者提供了一套高效、安全的认证和授权解决...

Global site tag (gtag.js) - Google Analytics