【问题标题】:org.springframework.beans.factory.BeanCreationException while converting spring boot application to spring MVC warorg.springframework.beans.factory.BeanCreationException 将 Spring Boot 应用程序转换为 Spring MVC 战争
【发布时间】:2017-03-11 05:07:00
【问题描述】:

我正在尝试将我现有的应用程序从 spring boot 转换为 spring mvc war。

我已经对pom.xml 进行了更改,例如将包装更改为战争并添加了以下依赖项:

<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-tomcat</artifactId>
    <scope>provided</scope>
</dependency> 

创建了新的web.xml 并为 Faces Servlet 添加了条目。

尝试在tomcat上部署战争时:

org.springframework.beans.factory.BeanCreationException。这是 引起的 引起:java.lang.NoClassDefFoundError: javax/faces/event/AjaxBehaviorEvent

【问题讨论】:

    标签: spring-mvc jsf spring-boot war


    【解决方案1】:

    您显然缺少 javax.faces 依赖项

    <dependency>
      <groupId>org.glassfish</groupId>
      <artifactId>javax.faces</artifactId>
      <version>2.2.13</version>
    </dependency>
    

    【讨论】:

      猜你喜欢
      • 2017-12-21
      • 1970-01-01
      • 2018-04-04
      • 2020-02-26
      • 2019-03-23
      • 2015-05-26
      • 2022-11-10
      • 2023-03-26
      • 2015-09-07
      相关资源
      最近更新 更多