使用springboot连接mycat(底层是oracle), 查询数据正常,在写入数据的时候报
Caused by: java.sql.SQLException: Connection is read-only. Queries leading to data modification are not allowed
请各位大侠帮忙看看,是否在配置文件中要加点什么,事务配置有尝试过,没有什么用。用mysql客户端操作同一个用户,是可以正常读写,配置文件如下:
spring:
http:
multipart:
enabled: true
max-file-size: 3000MB
max-request-size: 900000MB
datasource:
read-only: false
url: jdbc:mysql://172.18.58.188:8066/abmdb11
username: test
password: ENC(7BjKLN7o22PyA0JTSu/KhA==)
driver-class-name: com.mysql.jdbc.Driver
type: org.apache.tomcat.jdbc.pool.DataSource
tomcat:
validation-query: select * from dual
jpa:
show-sql: true
database-platform: org.hibernate.dialect.MySQL5Dialect
hibernate:
ddl-auto: none