mysql配置已经改了,还是提示一下报错信息
数据库配置
spring:
# 开发时使用h2db数据库,上线时需要切换到mysql。切换时把下面mysql相关的datasource打开,注释掉h2相关的datasource全部注释掉(包括password下面的几行)。切换到mysql需要手动创建数据库,然后执行resource目录下的sql语句。
datasource:
driver-class-name: com.mysql.cj.jdbc.Driver
url: jdbc:mysql://${MYSQL_IP:localhost}:${MYSQL_PORT:3306}/${MYSQL_DB:wx}?useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai
username: ${MYSQL_USERNAME:root}
password: ${MYSQL_PASSWORD:rootlocal}
# datasource:
# driver-class-name: org.h2.Driver
# url: jdbc:h2:file:./channel_server;AUTO_SERVER=TRUE;MODE=MySQL
# username: sa
# password:
# initialization-mode: always
# data: classpath:sql/data.sql
# continue-on-error: true
... 68 common frames omitted
Caused by: org.h2.jdbc.JdbcSQLSyntaxErrorException: Table "WX_ACCOUNT" not found; SQL statement:
SELECT appid,name,imurl,type,verified,secret,token,aes_key FROM wx_account [42102-200]
at org.h2.message.DbException.getJdbcSQLException(DbException.java:453) ~[h2-1.4.200.jar!/:na]
at org.h2.message.DbException.getJdbcSQLException(DbException.java:429) ~[h2-1.4.200.jar!/:na]
at org.h2.message.DbException.get(DbException.java:205) ~[h2-1.4.200.jar!/:na]