こんにちは、私は私のプロジェクトのためにthymeleaf 3とスプリング4を使用していますとorg.thymeleaf.standard.StandardDialect。私は彼らの文書に従ってすべてを変えました。私はwildfly 10上でアプリケーションを実行すると、いくつかのエラーを示します。..NoSuchMethodError:春4とthymeleaf 3
21:35:15,447 WARN [org.springframework.web.context.support.XmlWebApplicationContext] (ServerService Thread Pool -- 9) Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'templateEngine' defined in class path resource [spring/ViewConfig.xml]: Instantiation of bean failed; nested exception is java.lang.NoSuchMethodError: org.thymeleaf.standard.StandardDialect.<init>(Ljava/lang/String;Ljava/lang/String;I)V
21:35:15,458 ERROR [org.springframework.web.servlet.DispatcherServlet] (ServerService Thread Pool -- 9) Context initialization failed: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'templateEngine' defined in class path resource [spring/ViewConfig.xml]: Instantiation of bean failed; nested exception is java.lang.NoSuchMethodError: org.thymeleaf.standard.StandardDialect.<init>(Ljava/lang/String;Ljava/lang/String;I)V
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:306)
Themeleaf3依存
<dependency>
<groupId>org.thymeleaf</groupId>
<artifactId>thymeleaf</artifactId>
<version>3.0.1.RELEASE</version>
</dependency>
<dependency>
<groupId>org.thymeleaf</groupId>
<artifactId>thymeleaf-spring4</artifactId>
<version>3.0.1.RELEASE</version>
</dependency>
<dependency>
<groupId>nz.net.ultraq.web.thymeleaf</groupId>
<artifactId>thymeleaf-layout-dialect</artifactId>
<version>1.0.6</version>
</dependency>
テンプレートは、リゾルバの設定が
<bean id="templateResolver"
class="org.thymeleaf.templateresolver.ServletContextTemplateResolver">
<property name="prefix" value="/WEB-INF/views/" />
<property name="suffix" value=".html" />
<property name="templateMode" value="HTML5" />
</bean>
<bean id="templateEngine" class="org.thymeleaf.spring4.SpringTemplateEngine">
<property name="templateResolver" ref="templateResolver" />
<property name="dialects">
<set>
<bean class="org.thymeleaf.standard.dialect.StandardDialect" />
<bean class="nz.net.ultraq.web.thymeleaf.LayoutDialect" />
</set>
</property>
</bean>
<bean class="org.thymeleaf.spring4.view.ThymeleafViewResolver">
<property name="templateEngine" ref="templateEngine" />
</bean>