异常
异常1:
1 | Caused by: org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'org.springframework.core.convert.ConversionService' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: { .springframework.beans.factory.annotation.Qualifier(value=webFluxConversionService)} |
异常2:
1 | org.springframework.context.ApplicationContextException: Unable to start web server; nested exception is org.springframework.context.ApplicationContextException: Unable to start ServletWebServerApplicationContext due to missing ServletWebServerFactory bean. |
1 | ## 解决过程 |
后来又看说是springboot版本不兼容问题,不管了,死马当活马医吧,将我的2.2.2改为2.0.5,成功了!!!
参考文章
最后修改springboot版本就好了,我的由2.2.2改为2.0.5,好像是2.1以上的版本不兼容。
关于webflux与mvc不兼容项目启动不起来的异常,如果项目中存在了tomcat的用来,则抛出的异常是
1 | org.springframework.context.ApplicationContextException: Unable to start web server; nested exception is org.springframework.context.ApplicationContextException: Unable to start ServletWebServerApplicationContext due to missing ServletWebServerFactory bean. |
而如果没有依赖tomcat则抛出的异常是
1 | Caused by: org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'org.springframework.core.convert.ConversionService' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: { .springframework.beans.factory.annotation.Qualifier(value=webFluxConversionService)} |