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

2 篇文章 0 订阅

尊重原创,转载请注明出处:https://blog.csdn.net/Jerry_liu20080504/article/details/84287009

当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版本造成的问题。其他版本配合待尝试。

  • 9
    点赞
  • 12
    收藏
    觉得还不错? 一键收藏
  • 23
    评论
评论 23
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值