0
点赞
收藏
分享

微信扫一扫

Error starting ApplicationContext. To display the conditions report re-run your application with

毅会 2023-11-09 阅读 46

错误信息:

Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.

2021-06-12 15:43:05.629 ERROR 9252 --- [           main] o.s.b.d.LoggingFailureAnalysisReporter   : 


***************************

APPLICATION FAILED TO START

***************************


Description:


Parameter 0 of method errorPageCustomizer 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.

问题原因:jar包冲突了

解决办法:删除原来的引用,按照下面的方式重新引入jar包,注意jar包的版本

/*引入cxf依赖*/
<dependency>
        <groupId>org.apache.cxf</groupId>
        <artifactId>cxf-spring-boot-starter-jaxws</artifactId>
        <version>3.2.9</version>
    </dependency>
/*引入jpa依赖*/
<dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-data-jpa</artifactId>
    </dependency>
/*引入mysql驱动依赖*/
<dependency>
        <groupId>mysql</groupId>
        <artifactId>mysql-connector-java</artifactId>
        <scope>runtime</scope>
    </dependency>


举报

相关推荐

Error starting ApplicationContext.

0 条评论