开发者

Spring's JdbcTemplate read only connection exception

开发者 https://www.devze.com 2022-12-21 03:12 出处:网络
I\'ve a function updating a database table using Spring\'s JdbcTemplate and 开发者_如何学Gofor some reason there was exception about the fact that the connection is read only and can\'t update any dat

I've a function updating a database table using Spring's JdbcTemplate and 开发者_如何学Gofor some reason there was exception about the fact that the connection is read only and can't update any database related changes. How to resolve this problem?


Check the transaction property. Is it Read-Only?
http://static.springsource.org/spring/docs/2.0.x/reference/transaction.html

Try adding this to the datasource defination

    <property name="defaultReadOnly">
        <value>false</value>
    </property>
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号