解决CONDITIONS EVALUATION REPORT 错误信息

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

Positive matches:

CodecsAutoConfiguration matched:
- @ConditionalOnClass found required class ‘org.springframework.http.codec.CodecConfigurer’ (OnClassCondition)

CodecsAutoConfiguration.JacksonCodecConfiguration matched:
- @ConditionalOnClass found required class ‘com.fasterxml.jackson.databind.ObjectMapper’ (OnClassCondition)

CodecsAutoConfiguration.JacksonCodecConfiguration#jacksonCodecCustomizer matched:
- @ConditionalOnBean (types: com.fasterxml.jackson.databind.ObjectMapper; SearchStrategy: all) found bean ‘jacksonObjectMapper’ (OnBeanCondition)

DispatcherServletAutoConfiguration matched:
- @ConditionalOnClass found required class ‘org.springframework.web.servlet.DispatcherServlet’ (OnClassCondition)
- found ‘session’ scope (OnWebApplicationCondition)

DispatcherServletAutoConfiguration.DispatcherServletConfiguration matched:
- @ConditionalOnClass found required class ‘javax.servlet.ServletRegistration’ (OnClassCondition)
- Default DispatcherServlet did not find dispatcher servlet beans (DispatcherServletAutoConfiguration.DefaultDispatcherServletCondition)

DispatcherServletAutoConfiguration.DispatcherServletRegistrationConfiguration matched:
- @ConditionalOnClass found required class ‘javax.servlet.ServletRegistration’ (OnClassCondition)
- DispatcherServlet Registration did not find servlet registration bean (DispatcherServletAutoConfiguration.DispatcherServletRegistrationCondition)

DispatcherServletAutoConfiguration.DispatcherServletRegistrationConfiguration#dispatcherServletRegistration matched:
- @ConditionalOnBean (names: dispatcherServlet; types: org.springframework.web.servlet.DispatcherServlet; SearchStrategy: all) found bean ‘dispatcherServlet’ (OnBeanCondition)

EmbeddedWebServerFactoryCustomizerAutoConfiguration matched:
- @ConditionalOnWebApplication (required) found ‘session’ scope (OnWebApplicationCondition)

EmbeddedWebServerFactoryCustomizerAutoConfiguration.TomcatWebServerFactoryCustomizerConfiguration matched:
- @ConditionalOnClass found required classes ‘org.apache.catalina.startup.Tomcat’, ‘org.apache.coyote.UpgradeProtocol’ (OnClassCondition)

ErrorMvcAutoConfiguration matched:
- @ConditionalOnClass found required classes ‘javax.servlet.Servlet’, ‘org.springframework.web.servlet.DispatcherServlet’ (OnClassCondition)
- found ‘session’ scope (OnWebApplicationCondition)

ErrorMvcAutoConfiguration#basicErrorController matched:
- @ConditionalOnMissingBean (types: org.springframework.boot.web.servlet.error.ErrorController; SearchStrategy: current) did not find any beans (OnBeanCondition)

ErrorMvcAutoConfiguration#errorAttributes matched:
- @ConditionalOnMissingBean (types: org.springframework.boot.web.servlet.error.ErrorAttributes; SearchStrategy: current) did not find any beans (OnBeanCondition)

ErrorMvcAutoConfiguration.DefaultErrorViewResolverConfiguration#conventionErrorViewResolver matched:
- @ConditionalOnBean (types: org.springframework.web.servlet.DispatcherServlet; SearchStrategy: all) found bean ‘dispatcherServlet’; @ConditionalOnMissingBean (types: org.springframework.boot.autoconfigure.web.servlet.error.DefaultErrorViewResolver; SearchStrategy: all) did not find any beans (OnBeanCondition)

ErrorMvcAutoConfiguration.WhitelabelErrorViewConfiguration matched:

【错误信息分析】
【错误原因】:单元测试文件中出错
可能导致原因:1.@Test注解包引入错误
我引的是import org.junit.jupiter.api.Test;这个包导致出错
[修改]import org.junit.Test;
【注】pom中不是junit5
2.要加上:@RunWith(SpringRunner.class)
例:
@RunWith(SpringRunner.class)
@SpringBootTest
public class RedisTemplateApplicationTests {}
【总结】我的错误是在Junit单元测试中引入包错误,若遇到相同错误可以仔细检查单元测试文件

评论 9
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值