Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JPA环境下WallFilter与H2数据库不兼容 #3923

Closed
winhkey opened this issue Aug 28, 2020 · 0 comments
Closed

JPA环境下WallFilter与H2数据库不兼容 #3923

winhkey opened this issue Aug 28, 2020 · 0 comments
Milestone

Comments

@winhkey
Copy link

winhkey commented Aug 28, 2020

druid版本:1.1.22

异常信息:at com.alibaba.druid.wall.WallFilter.checkInternal(WallFilter.java:805)

代码:WallCheckResult checkResult = provider.check(sql);

分析:JPA生成的建表语句里主键字段是id bigint generated by default as identity
数据库是H2,WallProvider没有对应的实现类,provider是默认的MySqlWallProvider实现,导致检查报错

规避:把filter的wall配置去掉
建议:增加H2WallProvider实现类

@wenshao wenshao added this to the 1.2.0 milestone Oct 6, 2020
@wenshao wenshao modified the milestones: 1.2.1, 1.2.2 Oct 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants