We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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 参数时,基本数据类型使用 JSONUtil.toJsonStr() 无法 JSON 序列化,导致日志打印内容为空
c.x.orm.jdbctemplate.dao.base.BaseDao : 【执行SQL】SQL:DELETE FROM `orm_user` where id = ? c.x.orm.jdbctemplate.dao.base.BaseDao : 【执行SQL】参数:{}
c.x.orm.jdbctemplate.dao.base.BaseDao : 【执行SQL】SQL:SELECT * FROM `orm_user` where id = ? c.x.orm.jdbctemplate.dao.base.BaseDao : 【执行SQL】参数:{}
c.x.orm.jdbctemplate.dao.base.BaseDao : 【执行SQL】SQL:DELETE FROM `orm_user` where id = ? c.x.orm.jdbctemplate.dao.base.BaseDao : 【执行SQL】参数:1
c.x.orm.jdbctemplate.dao.base.BaseDao : 【执行SQL】SQL:SELECT * FROM `orm_user` where id = ? c.x.orm.jdbctemplate.dao.base.BaseDao : 【执行SQL】参数:1
无
此处参数数量仅为 1,打印时无需使用 JSONUtil.toJsonStr(),直接打印即可
如:log.debug("【执行SQL】参数:{}", JSONUtil.toJsonStr(pk)); -> log.debug("【执行SQL】参数:{}", pk);
log.debug("【执行SQL】参数:{}", JSONUtil.toJsonStr(pk));
log.debug("【执行SQL】参数:{}", pk);
The text was updated successfully, but these errors were encountered:
我来提一个fix 这个issues
Sorry, something went wrong.
xkcoding
No branches or pull requests
描述问题
在日志打印 SQL 参数时,基本数据类型使用 JSONUtil.toJsonStr() 无法 JSON 序列化,导致日志打印内容为空
期待的结果
截屏或录像
无
改进建议
此处参数数量仅为 1,打印时无需使用 JSONUtil.toJsonStr(),直接打印即可
如:
log.debug("【执行SQL】参数:{}", JSONUtil.toJsonStr(pk));
->log.debug("【执行SQL】参数:{}", pk);
The text was updated successfully, but these errors were encountered: