java - 我不想从 axboot 记录 jpa 查询
问题描述
我不想从 axboot 记录 jpa 查询。
此框架不包含任何可配置的 xml 文件,仅包含属性文件。
如果您修改属性中的值,查询仍会堆积在日志中。
我该如何修改它?
2019-07-01 15:14:23 [http-nio-8080-exec-9] INFO com.chequer.axboot.core.db.aop.StatementMethodInterceptor:invoke:149
[query] - 2019-07-01 15:14:23 -
select
user0_.USER_CD as USER_CD1_4_0_,
user0_.CREATED_AT as CREATED_2_4_0_,
user0_.CREATED_BY as CREATED_3_4_0_,
user0_.UPDATED_AT as UPDATED_4_4_0_,
user0_.UPDATED_BY as UPDATED_5_4_0_,
user0_.agent_id as agent_id6_4_0_,
user0_.DEL_YN as DEL_YN7_4_0_,
user0_.EMAIL as EMAIL8_4_0_,
user0_.HP_NO as HP_NO9_4_0_,
user0_.IP as IP10_4_0_,
user0_.LAST_LOGIN_DATE as LAST_LO11_4_0_,
user0_.LOCALE as LOCALE12_4_0_,
user0_.MENU_GRP_CD as MENU_GR13_4_0_,
user0_.PASSWORD_UPDATE_DATE as PASSWOR14_4_0_,
user0_.REMARK as REMARK15_4_0_,
user0_.USE_YN as USE_YN16_4_0_,
user0_.USER_NM as USER_NM17_4_0_,
user0_.user_no as user_no18_4_0_,
user0_.USER_PS as USER_PS19_4_0_,
user0_.USER_ROLE as USER_RO20_4_0_,
user0_.USER_STATUS as USER_ST21_4_0_
from
_user user0_
.....
hibernate.jdbc.batch_size=30
hibernate.order_inserts=true
hibernate.order_updates=true
hibernate.jdbc.batch_versioned_data=true
spring.jpa.hibernate.jdbc.batch_size=30
spring.jpa.hibernate.order_inserts=true
spring.jpa.hibernate.order_updates=true
spring.jpa.hibernate.jdbc.batch_versioned_data=true
spring.jpa.properties.hibernate.jdbc.batch_size=30
spring.jpa.properties.hibernate.order_inserts=true
spring.jpa.properties.hibernate.order_updates=true
spring.jpa.properties.hibernate.jdbc.batch_versioned_data=true
spring.jpa.properties.hibernate.show_sql=false
spring.jpa.properties.hibernate.format_sql=false
axboot.log.level=ERROR
axboot.log.slack.enabled=false
axboot.log.slack.webHookUrl=
axboot.log.slack.channel=error_logs
axboot.log.database.enabled=false
axboot.log.adminUrl=
解决方案
修改属性文件没有意义。
最后我找到了答案。
我在 axBootLogbackAppender 上的错误 LoggerContext 中添加了错误级别。
添加'loggerContext.getLogger("ROOT").setLevel(Level.ERROR);' 到“CoreApplicationContext”文件的“axBootLogbackAppender”方法。
我会找到答案的。一如既往的哈哈哈
推荐阅读
- python - 列出重复项的操作
- java - squarespace 地方发展问题
- java - Java:生成唯一的随机字符
- python - 在python中使用opencv从图像中去除高密度噪声
- javascript - 类型 'number[]' 缺少类型 '[number, number, number, number]' 中的以下属性:0、1、2、3
- mongodb - 使用 mongoose mongo 加入两个不同的集合(按 id)
- cassandra - 如何确定 Cassandra 节点是否已耗尽?
- ruby-on-rails - 如何在 Rails 中根据请求验证 activerecord 字段?
- dart - 无法在 url 启动器中使用 #(快速拨号)
- javascript - 带有可变 url 的 Window.open ---我尝试了又尝试了 - 请指出我正确的方向