Java 未找到匹配的工厂方法:工厂bean';Freemarker配置工厂';;工厂法';createConfiguration()';
我试图在我的项目中使用SpringMVC和freemarker。但当我尝试使用ApplicationContext.getBean(String)方法创建配置对象时,出现以下错误: org.springframework.beans.factory.BeanCreationException:创建在类路径资源[META-INF/applicationContext.xml]中定义了名为“freeMarkerConfiguration”的bean时出错:未找到匹配的工厂方法:工厂bean“freeMarkerConfiguration工厂”;工厂方法“createConfiguration()”。检查具有指定名称和参数的方法是否存在,以及该方法是否为非静态方法 My applicationContext.xml定义为:Java 未找到匹配的工厂方法:工厂bean';Freemarker配置工厂';;工厂法';createConfiguration()';,java,spring,spring-mvc,Java,Spring,Spring Mvc,我试图在我的项目中使用SpringMVC和freemarker。但当我尝试使用ApplicationContext.getBean(String)方法创建配置对象时,出现以下错误: org.springframework.beans.factory.BeanCreationException:创建在类路径资源[META-INF/applicationContext.xml]中定义了名为“freeMarkerConfiguration”的bean时出错:未找到匹配的工厂方法:工厂bean“free
<bean id="freeMarkerConfigurationFactory"
class="org.springframework.ui.freemarker.FreeMarkerConfigurationFactoryBean">
<property name="templateLoaderPath" value="classpath:/" />
<property name="preferFileSystemAccess" value="false" />
</bean>
<bean id="freeMarkerConfiguration" class="freemarker.template.Configuration"
factory-bean="freeMarkerConfigurationFactory" factory-method="createConfiguration"
scope="prototype" />
pom.xml:
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context-support</artifactId>
<version>3.2.13.RELEASE</version>
</dependency>
<dependency>
<groupId>org.freemarker</groupId>
<artifactId>freemarker</artifactId>
<version>2.3.25-incubating</version>
</dependency>
org.springframework
spring上下文支持
3.2.13.释放
org.freemarker
自由标记
2.3.25-孵化
我使用JBoss EAP 6.4.x作为应用服务器