i使用弹簧框架,速度和Sring休息完整的Web服务。在我的root-context.xml中,它正在使用"来抱怨我:
这是完整的代码:
<?xml version="1.0" encoding="UTF-8"?>
http://www.springframework.org/schema/beans/spring-beans.xsd">
<!-- Root Context: defines shared resources visible to all other web components -->
<beans>
<bean id="sender" class="org.springframework.mail.javamail.JavaMailSenderImpl">
<property name="host" value="smtp.gmail.com"/>
<property name="port" value="25"/>
<property name="username" value="jadeite1000@gmail.com"/>
<property name="password" value="Jadeite1"/>
<property name="javaMailProperties">
<props>
<prop key="mail.transport.protocol">smtp</prop>
<prop key="mail.smtp.auth">true</prop>
<prop key="mail.smtp.starttls.enable">true</prop>
<prop key="mail.debug">true</prop>
</props>
</property>
<property name="velocityEngine">
<ref bean="velocityEngine"/>
</property>
</bean>
<bean id="emailEcardConfig" class="com.email.EcardMailConfig">
<property name="from">
<value>abc@yahoo.com</value>
</property>
<property name="subject">
<value>Testing Email!</value>
</property>
<property name="htmlTemplatePath">
<value>EcardHtmlTemplate.vm</value>
</property>
<property name="velocityEngine">
<ref local="velocityEngine"/>
</property>
</bean>
<bean id="velocityEngine" class="org.springframework.ui.velocity.VelocityEngineFactoryBean">
<property name="resourceLoaderPath"><value>/WEB-INF/classes/velocity/</value></property>
</bean>
任何提示或帮助都非常感谢!
从您的代码中删除" local",spring
不再允许<property name="velocityEngine">
<ref local="velocityEngine"/>
</property>