码迷,mamicode.com
首页 > 编程语言 > 详细

Spring boot 开发WebService遇到的问题之一

时间:2019-03-21 17:23:31      阅读:2234      评论:0      收藏:0      [点我收藏+]

标签:failure   文件中   ***   nes   exp   res   ref   ted   frame   

当pom.xml文件中的配置:

<artifactId>spring-boot-starter-parent</artifactId><version>2.0.6.RELEASE</version>
<artifactId>cxf-spring-boot-starter-jaxws</artifactId><version>3.2.6</version>


parent版本是2.0.4,同时jaxws版本是3.2.6时;
parent版本是2.0.5,同时jaxws版本是3.2.6时;
parent版本是2.0.6,同时jaxws版本是3.2.6时;
parent版本是2.1.0,同时jaxws版本是3.2.6时;
parent版本是2.0.6,同时jaxws版本是3.1.11时;
会出现以下错误:
. ____ _ __ _ _
/\\ / ___‘_ __ _ _(_)_ __ __ _ \ \ \ \
( ( )\___ | ‘_ | ‘_| | ‘_ \/ _` | \ \ \ \
\\/ ___)| |_)| | | | | || (_| | ) ) ) )
‘ |____| .__|_| |_|_| |_\__, | / / / /
=========|_|==============|___/=/_/_/_/
:: Spring Boot :: (v2.0.6.RELEASE)

2018-11-20 10:10:14.858 INFO 230600 --- [ main] com.dk.root.Dk20181120Application : Starting Dk20181120Application on Jerry-PC with PID 230600 (started by Jerry in G:\东科20180920\projects\dk20181120)
2018-11-20 10:10:14.860 INFO 230600 --- [ main] com.dk.root.Dk20181120Application : No active profile set, falling back to default profiles: default
2018-11-20 10:10:14.885 INFO 230600 --- [ main] ConfigServletWebServerApplicationContext : Refreshing org.springframework.boot.web.servlet.context.AnnotationConfigServletWebServerApplicationContext@214b199c: startup date [Tue Nov 20 10:10:14 CST 2018]; root of context hierarchy
2018-11-20 10:10:15.383 WARN 230600 --- [ main] ConfigServletWebServerApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.context.ApplicationContextException: Unable to start web server; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘tomcatServletWebServerFactory‘ defined in class path resource [org/springframework/boot/autoconfigure/web/servlet/ServletWebServerFactoryConfiguration$EmbeddedTomcat.class]: Initialization of bean failed; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name ‘org.springframework.boot.autoconfigure.web.servlet.error.ErrorMvcAutoConfiguration‘: Unsatisfied dependency expressed through constructor parameter 1; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type ‘org.springframework.boot.autoconfigure.web.servlet.DispatcherServletPath‘ available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {}
2018-11-20 10:10:15.388 INFO 230600 --- [ main] ConditionEvaluationReportLoggingListener :
Error starting ApplicationContext. To display the conditions report re-run your application with ‘debug‘ enabled.
2018-11-20 10:10:15.451 ERROR 230600 --- [ main] o.s.b.d.LoggingFailureAnalysisReporter :
***************************
APPLICATION FAILED TO START
***************************
Description:
Parameter 1 of constructor in org.springframework.boot.autoconfigure.web.servlet.error.ErrorMvcAutoConfiguration required a bean of type ‘org.springframework.boot.autoconfigure.web.servlet.DispatcherServletPath‘ that could not be found.
The following candidates were found but could not be injected:
- Bean method ‘dispatcherServletRegistration‘ in ‘DispatcherServletAutoConfiguration.DispatcherServletRegistrationConfiguration‘ not loaded because DispatcherServlet Registration found non dispatcher servlet dispatcherServlet
Action:
Consider revisiting the entries above or defining a bean of type ‘org.springframework.boot.autoconfigure.web.servlet.DispatcherServletPath‘ in your configuration.


parent版本是1.4.5,同时jaxws版本是3.1.7时;
parent版本是1.4.5,同时jaxws版本是3.1.11时;
parent版本是1.5.6,同时jaxws版本是3.1.11时;
parent版本是1.5.8,同时jaxws版本是3.1.12时;
parent版本是1.5.9,同时jaxws版本是3.1.11时;
parent版本是1.5.9,同时jaxws版本是3.1.12时;
parent版本是2.0.3,同时jaxws版本是3.2.6时;
则运行正常。

目前只尝试了这几种版本,分析认为应该是parent版本造成的问题。其他版本配合待尝试。

Spring boot 开发WebService遇到的问题之一

标签:failure   文件中   ***   nes   exp   res   ref   ted   frame   

原文地址:https://www.cnblogs.com/mracale/p/10572863.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!