web-flash是一个基于Spring Boot和Vue.js的web系统。参考:https://github.com/enilu/web-flash
1.下载驱动
参考:https://www.kingbase.com.cn/kj/index.htm
1.jdbc驱动
- 下载驱动包:因为项目拟使用人大金仓数据库,所以jdbc驱动选择人大金仓的。
- 如下所示:选择kingbase8-8.6.0.jar
2.hibernate方言包
- hibernate方言包由KingbaseES提供,其方言包的版本和Hibernate驱动包的对应关系如下:
- 下载hibernate方言包
2.将上述下载的驱动配置到项目的classpath路径下
- 在flash-api/src/main/resources路径下新建目录lib
- 将上述下载的两个jar包放入此目录下
- 手动添加依赖:打开模块设置
3.项目配置文件
- application.yml
spring:
profiles:
active: dev
cache:
ehcache:
config: classpath:ehcache.xml
datasource:
name: kingbase8
driver-class-name: com.kingbase8.Driver
druid:
web-stat-filter:
enabled: true
url-pattern: /*
stat-view-servlet:
enabled: true
url-pattern: /*
reset-enable: false
login-username: druiduser
login-password: druidpwd
allow: 127.0.0.1
sql-script-encoding: UTF-8
jackson:
date-format: yyyy-MM-dd HH:mm:ss
time-zone: GMT+8
mail:
host: smtp.qq.com
username: enidfdluzt@qq.com
password: 123456
port: 465
protocol: smtp
jpa:
org.hibernate.dialect.MySQL5InnoDBDialect
database-platform: org.hibernate.dialect.Kingbase8Dialect
open-in-view: false
show-sql: true
properties:
hibernate.dialect: org.hibernate.dialect.Kingbase8Dialect
hibernate.format_sql: true
hibernate.max_fetch_depth: 1
hibernate.generate_statistics: true
hibernate.use_sql_comments: false
servlet:
multipart:
max-file-size: 100MB
jwt:
token:
expire:
time: 30
server:
port: 8082
- application-dev.yml:
debug: false
spring:
datasource:
url: jdbc:kingbase8://ip:port/库名称?zeroDateTimeBehavior=convertToNull&useUnicode=true&characterEncoding=utf-8¤tSchema=ym_tyg,SYS_CATALOG
username: 用户名
password: 密码
jpa:
hibernate:
ddl-auto: update