chen2518960
chen2518960
2016-03-22 07:52

springmvc 和velocity 配置 报错 VelocityEngineFactory NoClassDefFoundError

  • spring
  • maven
  • velocity

spring 4.1.6.RELEASE maven方式.
报错如下:
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'accountController': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: org.geekworld.service.AccountService org.geekworld.controller.AccountController.accountService; nested exception is org.springframework.beans.factory.CannotLoadBeanClassException: Error loading class [org.springframework.web.servlet.view.velocity.VelocityConfigurer] for bean with name 'velocityConfig' defined in class path resource [spring-servlet.xml]: problem with class file or dependent class; nested exception is java.lang.NoClassDefFoundError: org/springframework/ui/velocity/VelocityEngineFactory
配置为



<!-- 使用springMacro的对象 -->





<!-- spring的日期格式化 -->

<!-- velocity toolbox -->


图片说明

  • 点赞
  • 回答
  • 收藏
  • 复制链接分享

0条回答