浏览 2047 次
锁定老帖子 主题:spring集成velocity
该帖已经被评为新手帖
|
|
---|---|
作者 | 正文 |
发表时间:2008-08-05
<bean id="velocityEngine" class="org.springframework.ui.velocity.VelocityEngineFactoryBean"> <property name="velocityProperties"> <props> <prop key="resource.loader">class</prop> <prop key="class.resource.loader.class"> org.apache.velocity.runtime.resource.loader.ClasspathResourceLoader </prop> <prop key="velocimacro.library" /> <!-- <prop key="file.resource.loader.path">WEB-INF</prop> --> </props> </property> <!-- --><property name="resourceLoaderPath" value="/WEB-INF"></property> </bean> <bean id="mailSender" class="org.springframework.mail.javamail.JavaMailSenderImpl"> <property name="host"> <value>smtp.gmail.com</value> </property> <property name="javaMailProperties"> <props> <prop key="mail.smtp.auth">true</prop> <prop key="mail.smtp.timeout">25000</prop> <prop key="mail.smtp.socketFactory.port">465</prop> <prop key="mail.smtp.socketFactory.class">javax.net.ssl.SSLSocketFactory</prop> <prop key="mail.smtp.socketFactory.fallback">false</prop> <prop key="mail.smtp.starttls.enable">true</prop> </props> </property> <property name="username"> <value>aaa@gmail.com</value> </property> <property name="password"> <value>123456</value> </property> </bean> <bean id="emailNotification" class="com.web.util.email.EmailNotificationImpl"> <property name="javaMailSender" ref="mailSender" /> </bean> <bean id="emailMessageProducer" class="com.web.util.email.EmailMessageProducerImpl"> <property name="velocityEngine" ref="velocityEngine" /> </bean> 声明:ITeye文章版权属于作者,受法律保护。没有作者书面许可不得转载。
推荐链接
|
|
返回顶楼 | |