开发者社区> 问答> 正文

spring mvc集成tiles的问题

0 spring mvc集成tiles的问题5 我在spring-servlet里配置的内容:

Java代码 收藏代码

<bean id="viewResolver"  class="org.springframework.web.servlet.view.UrlBasedViewResolver">    
<property name="viewClass">     
<value>    org.springframework.web.servlet.view.tiles2.TilesView   </value>    
</property>   
</bean>   
<bean id="tilesConfigurer"  class="org.springframework.web.servlet.view.tiles2.TilesConfigurer">    
<property name="definitions">     
<list>      
<value>/WEB-INF/tiles.xml</value>     
</list>    
</property>   
</bean>

启动Tomcat时报错的错误堆栈: Java代码 收藏代码

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'tilesConfigurer' defined in ServletContext resource [/WEB-INF/config/spring-servlet.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [org.springframework.web.servlet.view.tiles2.TilesConfigurer]: Constructor threw exception; nested exception is java.lang.NoClassDefFoundError: org/apache/tiles/servlet/context/wildcard/WildcardServletTilesApplicationContextFactoryCaused by: org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [org.springframework.web.servlet.view.tiles2.TilesConfigurer]: Constructor threw exception; nested exception is java.lang.NoClassDefFoundError: org/apache/tiles/servlet/context/wildcard/WildcardServletTilesApplicationContextFactory

我打开tiles-servlet.jar包看了下,里面并没有WildcardServletTilesApplicationContextFactory这个类,不知道是怎么回事,总报这个错呢?

展开
收起
长安归故里. 2020-01-31 13:45:07 1093 0
1 条回答
写回答
取消 提交回答
  • 更换tiles-servlet.jar

    2020-01-31 13:45:14
    赞同 展开评论 打赏
问答排行榜
最热
最新

相关电子书

更多
The Reactive Cloud Native Arch 立即下载
集成智能接入网关APP:优化企业级移动办公网络 立即下载
云效助力企业集成安全到DevOps中 立即下载

相关实验场景

更多