spring框架中配置read-only=true/false配置事务的只读
在oracle中配置read-only=true依赖可以执行数据库更新操作.
Oracle官网:
oracle:10.1
Transaction Isolation Levels and Access Modes
Read-only connections are supported by the Oracle server, but not by the Oracle JDBC drivers.
For transactions, the Oracle server supports only the TRANSACTION_READ_COMMITTED and TRANSACTION_SERIALIZABLE transaction isolation levels. The default is TRANSACTION_READ_COMMITTED . Use the following methods of the oracle.jdbc.OracleConnection interface to get and set the level:
-
getTransactionIsolation() : Gets this connection's current transaction isolation level.
-
setTransactionIsolation() : Changes the transaction isolation level, using one of the TRANSACTION_* values.
oracle:11.1
Transaction Isolation Levels and Access Modes
Read-only connections are supported by the Oracle server, but not by Oracle JDBC drivers.
For transactions, the Oracle server supports only the TRANSACTION_READ_COMMITTED and TRANSACTION_SERIALIZABLE transaction isolation levels. The default is TRANSACTION_READ_COMMITTED . Use the following methods of the oracle.jdbc.OracleConnection interface to get and set the level:
-
getTransactionIsolation : Gets this connection's current transaction isolation level.
-
setTransactionIsolation : Changes the transaction isolation level, using one of the TRANSACTION_* values.
|