maven + thymeleaf 无法实例化bean错误记载

  • Post author:
  • Post category:其他


最近公司新开项目 想练点新技术,于是乎选用了thymeleaf做前台 jsp做后台,IDE选用的是IDEA,(就是这么智能的IDE导致我两天都在查这个错误)

但是在配置环境的过程中tomcat启动无限报

错误: BeanCreationException
错误描述:
Error creating bean with name 'templateEngine' defined in URL [file:/C:/Users/chuan/Desktop/jshShow/target/jshShow/WEB-INF/classes/springMVC-servlet.xml]: Instantiation of bean failed; nested exception is java.lang.NoClassDefFoundError: Could not initialize class org.thymeleaf.spring4.SpringTemplateEngine
错误信息:
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'templateEngine' defined in URL [file:/C:/Users/chuan/Desktop/jshShow/target/jshShow/WEB-INF/classes/springMVC-servlet.xml]: Instantiation of bean failed; nested exception is java.lang.NoClassDefFoundError: Could not initialize class org.thymeleaf.spring4.SpringTemplateEngine
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:1105)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1050)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:510)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:482)
	at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:305)
	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:301)
	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:196)
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:772)
	at 



版权声明:本文为qq_38296054原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。