首页 > 解决方案 > 我不想从 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=

标签: javaspringspring-bootjspjpa

解决方案


修改属性文件没有意义。

最后我找到了答案。

我在 axBootLogbackAppender 上的错误 LoggerContext 中添加了错误级别。

添加'loggerContext.getLogger("ROOT").setLevel(Level.ERROR);' 到“CoreApplicationContext”文件的“axBootLogbackAppender”方法。

我会找到答案的。一如既往的哈哈哈


推荐阅读