当前位置: 首页 > news >正文

CONDITIONS EVALUATION REPORT-解决方案

  在启动SpringBoot项目时,提示一堆的Positive matches、Negative matches(如下代码框),感觉像是报错了样。但用SpringBoot的Test类操作数据库的Insert是成功的。提示这些信息通过网上搜索主要讲配置类被Spring容器加载与被加载的说明。名词解释如下:

  • Positive matches:@Conditional条件为真,配置类被Spring容器加载。
  • Negative matches: @Conditional条件为假,配置类未被Spring容器加载。
  • Exclusions: 应用端明确排除加载配置
  • Unconditional classes: 自动配置类不包含任何类级别的条件,也就是说,类始终会被自动加载。
2023-11-23 22:19:06.345 [DEBUG]  [main] o.s.c.s.DefaultLifecycleProcessor - Starting beans in phase -2147483647 
2023-11-23 22:19:06.345 [DEBUG]  [main] o.s.c.s.DefaultLifecycleProcessor - Successfully started bean 'springBootLoggingLifecycle' 
2023-11-23 22:19:06.348 [DEBUG]  [main] o.s.b.a.l.ConditionEvaluationReportLoggingListener - ============================
CONDITIONS EVALUATION REPORT
============================Positive matches:
-----------------ConfigurationPropertiesRebinderAutoConfiguration matched:- @ConditionalOnBean (types: org.springframework.boot.context.properties.ConfigurationPropertiesBindingPostProcessor; SearchStrategy: all) found bean 'org.springframework.boot.context.properties.ConfigurationPropertiesBindingPostProcessor' (OnBeanCondition)ConfigurationPropertiesRebinderAutoConfiguration#configurationPropertiesBeans matched:- @ConditionalOnMissingBean (types: org.springframework.cloud.context.properties.ConfigurationPropertiesBeans; SearchStrategy: current) did not find any beans (OnBeanCondition)ConfigurationPropertiesRebinderAutoConfiguration#configurationPropertiesRebinder matched:- @ConditionalOnMissingBean (types: org.springframework.cloud.context.properties.ConfigurationPropertiesRebinder; SearchStrategy: current) did not find any beans (OnBeanCondition)EncryptionBootstrapConfiguration matched:- @ConditionalOnClass found required class 'org.springframework.security.crypto.encrypt.TextEncryptor' (OnClassCondition)EncryptionBootstrapConfiguration#keyProperties matched:- @ConditionalOnMissingBean (types: org.springframework.cloud.bootstrap.encrypt.KeyProperties; SearchStrategy: all) did not find any beans (OnBeanCondition)PropertyPlaceholderAutoConfiguration#propertySourcesPlaceholderConfigurer matched:- @ConditionalOnMissingBean (types: org.springframework.context.support.PropertySourcesPlaceholderConfigurer; SearchStrategy: current) did not find any beans (OnBeanCondition)Negative matches:
-----------------EncryptionBootstrapConfiguration.RsaEncryptionConfiguration:Did not match:- Keystore nor key found in Environment (EncryptionBootstrapConfiguration.KeyCondition)Matched:- @ConditionalOnClass found required class 'org.springframework.security.rsa.crypto.RsaSecretEncryptor' (OnClassCondition)EncryptionBootstrapConfiguration.VanillaEncryptionConfiguration:Did not match:- @ConditionalOnMissingClass found unwanted class 'org.springframework.security.rsa.crypto.RsaSecretEncryptor' (OnClassCondition)Exclusions:
-----------NoneUnconditional classes:
----------------------None


  虽然不影响功能,但看起来受不了。于是一顿搜索,网上有说在yml里面配置springframework日志为info或error,或配置logging日志都不对。突然间查看日志打开【DEBUG】,恍然大悟自己的工程文件中配置有logback.xml,于是在里修改日志级别为INFO就不会打印烦人的加载信息了。

<?xml version="1.0" encoding="UTF-8"?>
<configuration><!--CONSOLE :表示当前的日志信息是可以输出到控制台的。--><appender name="Console" class="ch.qos.logback.core.ConsoleAppender"><encoder><pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%level]  %cyan([%thread]) %boldGreen(%logger{15}) - %msg %n</pattern></encoder></appender><logger name="com.itheima" level="INFO" additivity="false"><appender-ref ref="Console"/></logger><!--level:用来设置打印级别,大小写无关:TRACE, DEBUG, INFO, WARN, ERROR, ALL 和 OFF, 默认debug<root>可以包含零个或多个<appender-ref>元素,标识这个输出位置将会被本日志级别控制。--><root level="INFO"><appender-ref ref="Console"/></root>
</configuration>

参考地址:

https://www.cnblogs.com/ithg/p/15661021.html

参考地址:

了解Spring Boot的自动配置-腾讯云开发者社区-腾讯云

http://www.lryc.cn/news/241795.html

相关文章:

  • 计算机网络——路由
  • python+requests+pytest+allure自动化框架
  • css3
  • 超级应用平台(HAP)起航
  • cocos2dx ​​Animate3D(二)
  • 基于java技术的社区交易二手平台
  • (Matalb回归预测)GA-BP遗传算法优化BP神经网络的多维回归预测
  • 【Docker】从零开始:10.registry搭建私有仓库
  • 树莓派上使用Nginx通过内网穿透实现无公网IP访问内网本地站点
  • 长征故事vr互动教育体验系统让师生感同身受
  • 汽车级芯片NCV7518MWATXG 可编程六沟道低压侧 MOSFET预驱动器 特点、参数及应用
  • 【分布式】小白看Ring算法 - 03
  • 使用Git bash切换Gitee、GitHub多个Git账号
  • 【RtpRtcp】1: webrtc m79:audio的ChannelReceive 创建并使用
  • Ubuntu系统安装docker
  • 如何访问linux上的web服务
  • Vatee万腾的数字化掌舵:Vatee科技解决方案的全面引领
  • YOLOv5 第Y6周 模型改进
  • Unity Android FireBase bugly报错查询
  • React中如何解决点击<Tree>节点前面三角区域不触发onClick事件
  • 如何利用4G路由器构建茶饮连锁店物联网
  • 【2024系统架构设计】 系统架构设计师第二版-大数据架构理论设计与实践
  • 正整数分解
  • 基于51单片机电子钟闹钟LCD1602显示proteus仿真设计
  • 第三节-Android10.0 Binder通信原理(三)-ServiceManager篇
  • 使用XHProf查找PHP性能瓶颈
  • 矩阵论(Matrix)
  • 解决Emmy Lua插件在IDEA或 Reder 没有代码提示的问题(设置文件关联 增加对.lua.txt文件的支持)
  • macos端文件夹快速访问工具 Default Folder X 最新for mac
  • 树形 DP:树的直径