若依微服务项目整合人大金仓记录

1.人大金仓报错找不到表中的某个字段
    问题:
        ① 人大金仓自带表中可能会与自己建的数据库中的表名字冲突,比如sys_user或者sys_config,可以通过改自己的表名解决。
        ② 改过表名后还会报该错的话,有可能有些冲突的表名字没有改过来或者改的不对不能和人大金仓中的表区分开,所以还是优先读取人大金仓中的
    解决:
        首先改表名,其次设置优先查询当前模式中表的数据:
        即在url路径后添加:currentSchema=ry-cloud,sys_catalog
        完整url举例:url: jdbc:kingbase8://localhost:54321/zd_online?currentSchema=ry-cloud,sys_catalog&allowEncodingChanges=true&clientEncoding=UTF8&zeroDateTimeBehavior=convertToNull&allowMultiQueries=true

完整spring配置记录参考(不用看)
# spring配置
spring:
  redis:
    host: localhost
    port: 6379
    password:
  datasource:
    druid:
      stat-view-servlet:
        enabled: true
        loginUsername: admin
        loginPassword: 123456
    dynamic:
      druid:
        initial-size: 5
        min-idle: 5
        maxActive: 20
        maxWait: 60000
        connectTimeout: 30000
        socketTimeout: 60000
        timeBetweenEvictionRunsMillis: 60000
        minEvictableIdleTimeMillis: 300000
        validationQuery: SELECT 1 FROM DUAL
        testWhileIdle: true
        testOnBorrow: false
        testOnReturn: false
        poolPreparedStatements: true
        maxPoolPreparedStatementPerConnectionSize: 20
        filters: stat,slf4j
        connectionProperties: druid.stat.mergeSql\=true;druid.stat.slowSqlMillis\=5000
      datasource:
        # 主库数据源
        master:
          driver-class-name: com.kingbase8.Driver
          url: jdbc:kingbase8://localhost:54321/zd_online?currentSchema=ry-cloud,sys_catalog&allowEncodingChanges=true&clientEncoding=UTF8&zeroDateTimeBehavior=convertToNull&allowMultiQueries=true
#          url: jdbc:mysql://localhost:3306/ry-cloud?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
          username: system
          password: 1234

      #MySQL
      # driver-class-name: com.mysql.cj.jdbc.Driver
      #  url: jdbc:mysql://localhost:3306/ry-cloud?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
      # username: root
      # password: 1234

          # 从库数据源
          # slave:
          # username:
          # password:
          # url:
          # driver-class-name:

# mybatis配置
mybatis:
  # 搜索指定包别名
  typeAliasesPackage: com.ruoyi.system
  # 配置mapper的扫描,找到所有的mapper.xml映射文件
  mapperLocations: classpath:mapper/**/*.xml

# swagger配置
swagger:
  title: 系统模块接口文档
  license: Powered By ruoyi
  licenseUrl: https://ruoyi.vip

            

2.SQL 错误 [42601]: 错误: 语法错误 在 "`" 或附近的:
    解决:语法错误,人大金仓不支持飘号 " ` ",去除即可








posted @ 2024-06-27 11:55  sensen~||^_^|||&  阅读(78)  评论(0编辑  收藏  举报