CONDITIONS EVALUATION REPORT(條件評估報告)


記錄一個小問題,相信有很多用spring boot開發的小伙伴都出現過如圖一的錯誤。因為先入為主的因素導致在日志級別為DEBUG級別時,打印了如例2所示的日志,以為是一個報錯信息,資訊閱讀日志發現是一下系列的匹配流程。

這邊簡單記錄一下解決的方案,如果在沒有更換默認日志的情況下,

可以在application.yml配置:

logging:
level:
org:
springframework:
boot:
autoconfigure: error ###可以是info或者error

同樣可以在application.properties中配置
logging.level.org.springframework.boot.autoconfigure=error #可以是info或者error

如果更換了日志框架,且恰好為log4j,則可以在log4j.properties中添加一個配置:
log4j.logger.org.springframework.boot.autoconfigure=ERROR

例1:

**************************************
APPLICATION FAILED TO START
***************************************

例2:

============================
CONDITIONS EVALUATION REPORT
============================


Positive matches:
-----------------

AopAutoConfiguration matched:
- @ConditionalOnProperty (spring.aop.auto=true) matched (OnPropertyCondition)

AopAutoConfiguration.ClassProxyingConfiguration matched:
- @ConditionalOnMissingClass did not find unwanted class 'org.aspectj.weaver.Advice' (OnClassCondition)
- @ConditionalOnProperty (spring.aop.proxy-target-class=true) matched (OnPropertyCondition)

DataSourceAutoConfiguration matched:
- @ConditionalOnClass found required classes 'javax.sql.DataSource', 'org.springframework.jdbc.datasource.embedded.EmbeddedDatabaseType' (OnClassCondition)
- @ConditionalOnMissingBean (types: io.r2dbc.spi.ConnectionFactory; SearchStrategy: all) did not find any beans (OnBeanCondition)

DataSourceConfiguration.Generic matched:
- @ConditionalOnProperty (spring.datasource.type) matched (OnPropertyCondition)


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM