跳到主要内容

数据库、表、字段名称中包含“-”是报错处理

数据库名称包含“-”报错信息(使用新增组件)

"You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '-name.table-name (`field-name`) VALUES ('test3')' at line 1"

数据库表名称包含“-”报错信息

"You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '-name (`field-name`) VALUES ('test3')' at line 1"

数据库表字段包含“-”报错信息


解决方案:

在application.yml文件当中加入以下配置可解决:

manatee:
# 数据库名称的处理
dbNameCaseInsensitive: true
# 表名称处理
tableNameCaseInsensitive: true
# 字段名称处理
fieldNameCaseInsensitive: true