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

SQL 审计插入数据库时,会出现死循环。 #317

Open
GourdErwa opened this issue Apr 15, 2024 · 2 comments
Open

SQL 审计插入数据库时,会出现死循环。 #317

GourdErwa opened this issue Apr 15, 2024 · 2 comments

Comments

@GourdErwa
Copy link

AuditManager 审计时,如果将审计的信息插入数据库,会出现死循环。
原因:会一直执行 inset sql 审计 SQL 表

建议:create 方法传入 boundSql,用户可以根据语句关键词过滤掉 inset sql 审计 SQL 表 的信息。

public static <T> T startAudit(AuditRunnable<T> supplier, Statement statement, BoundSql boundSql, Configuration configuration) throws SQLException {
        AuditMessage auditMessage = messageFactory.create();
...
@yangfuhai
Copy link
Contributor

这种情况是:项目审计自己的当前当前项目?

@GourdErwa
Copy link
Author

这种情况是:项目审计自己的当前当前项目?

自己持久化记录了执行 SQL 日志。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants