H2配置问题

用H2数据库表面前后加的是 “ ” 双引号
MYSQL表面前后加的是 `` 飘号

我想把H2的也配置成 `` 飘号

哪位大佬玩过 求赐教

没读懂。

image
这些是数据库表
查其他表都没问题
唯独 order 不行
报错如下

2021-07-08 19:25:43.498  WARN 15284 --- [nio-8088-exec-1] o.h.e.j.s.SqlExceptionHelper             : SQL Error: 42102, SQLState: 42S02
2021-07-08 19:25:43.499 ERROR 15284 --- [nio-8088-exec-1] o.h.e.j.s.SqlExceptionHelper             : Table "ORDER" not found; SQL statement:
/* select generatedAlias0 from Order as generatedAlias0 */ select order0_.`id` as id1_2_, order0_.`create_by` as create_b2_2_, order0_.`create_date` as create_d3_2_, order0_.`lastmodified` as lastmodi4_2_, order0_.`lastmodified_by` as lastmodi5_2_, order0_.`age` as age6_2_, order0_.`booking_date` as booking_7_2_, order0_.`color_desc` as color_de8_2_, order0_.`customer_id` as custome23_2_, order0_.`delivery_date` as delivery9_2_, order0_.`functional_desc` as functio10_2_, order0_.`material_desc` as materia11_2_, order0_.`number` as number12_2_, order0_.`occasion` as occasio13_2_, order0_.`order_num` as order_n14_2_, order0_.`order_status` as order_s15_2_, order0_.`pay_price` as pay_pri16_2_, order0_.`pay_status` as pay_sta17_2_, order0_.`pay_time` as pay_tim18_2_, order0_.`price` as price19_2_, order0_.`remark` as remark20_2_, order0_.`sex` as sex21_2_, order0_.`total_price` as total_p22_2_, order0_.`user_id` as user_id24_2_ from `order` order0_ [42102-195]
2021-07-08 19:25:43.519 ERROR 15284 --- [nio-8088-exec-1] o.a.c.c.C.[.[.[.[dispatcherServlet]      : Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed; nested exception is org.springframework.dao.InvalidDataAccessResourceUsageException: could not prepare statement; SQL [/* select generatedAlias0 from Order as generatedAlias0 */ select order0_.`id` as id1_2_, order0_.`create_by` as create_b2_2_, order0_.`create_date` as create_d3_2_, order0_.`lastmodified` as lastmodi4_2_, order0_.`lastmodified_by` as lastmodi5_2_, order0_.`age` as age6_2_, order0_.`booking_date` as booking_7_2_, order0_.`color_desc` as color_de8_2_, order0_.`customer_id` as custome23_2_, order0_.`delivery_date` as delivery9_2_, order0_.`functional_desc` as functio10_2_, order0_.`material_desc` as materia11_2_, order0_.`number` as number12_2_, order0_.`occasion` as occasio13_2_, order0_.`order_num` as order_n14_2_, order0_.`order_status` as order_s15_2_, order0_.`pay_price` as pay_pri16_2_, order0_.`pay_status` as pay_sta17_2_, order0_.`pay_time` as pay_tim18_2_, order0_.`price` as price19_2_, order0_.`remark` as remark20_2_, order0_.`sex` as sex21_2_, order0_.`total_price` as total_p22_2_, order0_.`user_id` as user_id24_2_ from `order` order0_]; nested exception is org.hibernate.exception.SQLGrammarException: could not prepare statement] with root cause
org.h2.jdbc.JdbcSQLException: Table "ORDER" not found; SQL statement:
/* select generatedAlias0 from Order as generatedAlias0 */ select order0_.`id` as id1_2_, order0_.`create_by` as create_b2_2_, order0_.`create_date` as create_d3_2_, order0_.`lastmodified` as lastmodi4_2_, order0_.`lastmodified_by` as lastmodi5_2_, order0_.`age` as age6_2_, order0_.`booking_date` as booking_7_2_, order0_.`color_desc` as color_de8_2_, order0_.`customer_id` as custome23_2_, order0_.`delivery_date` as delivery9_2_, order0_.`functional_desc` as functio10_2_, order0_.`material_desc` as materia11_2_, order0_.`number` as number12_2_, order0_.`occasion` as occasio13_2_, order0_.`order_num` as order_n14_2_, order0_.`order_status` as order_s15_2_, order0_.`pay_price` as pay_pri16_2_, order0_.`pay_status` as pay_sta17_2_, order0_.`pay_time` as pay_tim18_2_, order0_.`price` as price19_2_, order0_.`remark` as remark20_2_, order0_.`sex` as sex21_2_, order0_.`total_price` as total_p22_2_, order0_.`user_id` as user_id24_2_ from `order` order0_ [42102-195]

你JPA定义的时候手动添加,试试看

@Table(name = "`order`")

或者用配置

spring.jpa.properties.hibernate.globally_quoted_identifiers=true

两个都加了,不行

只能加一个。

下面那个配置之前就有

我单独删掉试试上面的吧

不行。。。。。。嘤嘤嘤