mybatis 连接 ORACLE| Id | Title | DateAdded | SourceUrl | PostType | Body | BlogId | Description | DateUpdated | IsMarkdown | EntryName | CreatedTime | IsActive | AutoDesc | AccessPermission |
| -------------| -------------| -------------| -------------| -------------| -------------| -------------| -------------| -------------| -------------| -------------| -------------| -------------| -------------| -------------|
| 17317938| mybatis 连接 ORACLE| 2023-04-14T12:24:00| | BlogPost|
application-common-dev.yml
spring: profiles: include: [common] main: allow-bean-definition-overriding: true #Redis服务器IP redis: host: 127.0.0.1 #Redis服务器连接端口 port: 6379 #Redis服务器连接密码 password: test jedis: pool: #连接池最大连接数(使用负值表示没有限制) max-active: 8 #连接池最大阻塞等待时间(使用负值表示没有限制) max-wait: 1 #连接池最大阻塞等待时间(使用负值表示没有限制) max-idle: 8 #连接池中的最小空闲连接 min-idle: 0 #连接超时时间(毫秒) timeout: 30000 datasource: driver-class-name: oracle.jdbc.OracleDriver url: jdbc:oracle:thin:@//FP-DB-USCAN.wfh.local:1521/fp_uat username: SZSW password: 5z5w0RAR0使用shardingJdbc时,
所有的jdbcType都不能是LONGVARCHAR,否则会导致java.io.NotSerializableException: java.io.StringReader错误
应该替换所有的 LONGVARCHAR 类型为VARCHAR
sharding:
jdbc:
datasource:
names: ds0 #,ds1
ds0:
type: com.zaxxer.hikari.HikariDataSource
driver-class-name: oracle.jdbc.OracleDriver
jdbc-url: jdbc:oracle:thin:@//FP-DB-USCAN.wfh.local:1521/fp_uat
username: SZSW
password: 5z5w0RAR0
# ds1:
# type: com.alibaba.druid.pool.DruidDataSource
# driver-class-name: com.mysql.jdbc.Driver
# url: jdbc:mysql://localhost:3306/novel_plus2
# username: root
# password: test123456
config:
sharding:
props:
sql.show: true
tables:
book_content: #book_content表
key-generator-column-name: id #主键
actual-data-nodes: ds${0}.book_content${0..9} #数据节点
# database-strategy: #分库策略
# inline:
# sharding-column: book_id
# algorithm-expression: ds${book_id % 10}
table-strategy: #分表策略
inline:
shardingColumn: index_id
algorithm-expression: book_content${index_id % 10}content:
save:
storage: db #存储介质,db:数据库,file:txt文本
path: /Users/xiongxiaoyang/books #txt小说文本保存路径
<!--oracle驱动--> <dependency> <groupId>com.oracle</groupId> <artifactId>ojdbc6</artifactId> <version>6.0</version> <type>jar</type> </dependency>
| 648658| | 2023-04-14T12:24:00| false| | 2023-04-14T12:23:51.273| true| application-common-dev.yml spring: profiles: include: [common] main: allow-bean-definition-overriding: true #Redis服务器IP redis: host: 127.0.0.1 #Redis服| Anonymous| 标签:jdbc,Redis,id,content,ORACLE,book,-------------,mybatis,连接 From: https://www.cnblogs.com/ralphlauren/p/18621256