applicationContext-mail.xml 模板
<?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation=" http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd "> <!-- 这配置文件大都也是固定的,只要找到一个这样的模板,然后清楚里面的每个参数是代表的什么意思,根据实际情况更改就行了.--> <!-- 将发送邮件的对象配置为Spring的Bean --> <bean id="mailSender" class="org.springframework.mail.javamail.JavaMailSenderImpl"> <!-- 邮件服务器主机 --> <property name="host" value="smtp.126.com"/> <!-- 设置用户名 --> <property name="username" value="itcast0228"/> <!-- 设置密码 --> <property name="password" value="0228itcast"/> <!-- 邮件属性 --> <property name="javaMailProperties"> <!-- 说一下这个props标签,现在就在两个文件中用到了这个props标签 --> <!-- <property name="hibernateProperties"> 一个是applicationContext.xml中的关于配置 <props> <prop key="hibernate.dialect">org.hibernate.dialect.MySQLDialect</prop> <prop key="hibernate.show_sql">true</prop> <prop key="hibernate.format_sql">false</prop> </props> --> <props> <!-- 开启验证 --> <prop key="mail.smtp.auth">true</prop> <!-- SMTP协议加密方式 --> <prop key="mail.smtp.starttls.enable">true</prop> <!-- 超时时间 --> <prop key="mail.smtp.timeout">10000</prop> </props> </property> </bean> </beans>
applicationContext-mail.xml 模板的更多相关文章
- 怎样给Eclipse添加一个Xml模板
1.找到Window/Preferences/XML/XML Files/Editor/Templates 2.新建一个模板,设置一个名称并且在Pattern中设置自己的XML模板就可以了,同时支持导 ...
- 使用freemarker生成xml模板
今天在java交流群里有个人问我如何用freemarker生成xml模板文件,可以手动配置参数,于是我到网上百度了一下.发现有一位同行的博文写的很nice,于是我就照着他的代码敲了一遍,最后实现了,本 ...
- 记录一下自己常用的maven工程的pom.xml模板
1. 带有hadoop-CDH4.2.1的pom.xml模板 <?xml version="1.0" encoding="UTF-8"?> < ...
- c3p0-config.xml模板详解
c3p0-config.xml模板详解 <c3p0-config> <default-config> <!--当连接池中的连接耗尽的时候c3p0一次同时获取的连接数.De ...
- applicationContext.xml 模板
<?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.sp ...
- ApplicationContext.xml模板
<?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www. ...
- 【文件】使用word的xml模板生成.doc文件
一.编辑模板 替换地方以变量标记如“案件编号”可写成{caseNo} template.xml 二.准备数据 以HashMap封装数据,原理是替换模板中的变量 三.替换操作 选择输出位置:writeP ...
- springboot mail+Thymeleaf模板
compile 'org.springframework.boot:spring-boot-starter-thymeleaf' compile 'io.ratpack:ratpack-thymele ...
- spring-service.xml 模板
ssm模板 <?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http:/ ...
随机推荐
- ES6学习(2)——arrows箭头函数
Arrows => 箭头函数 箭头函数,若有了解过coffeeScript的同学,或许对此印象深刻,因为它可以让语法省略不少,特别是对于回调函数,会让代码更清晰简洁. expression 让我 ...
- Oracle 递归查询
现实中我们经常需要用到一些递归查询,下面我们来介绍下ORACLE中递归查询的使用. 首先我们先新建一个表来存储以上信息 create table FAMILY ( person_id INTEGER, ...
- ocp 1Z0-042 61-120题解析
61. View the Exhibit.Which statement regarding the dept and emp tables is true?A) When you delete a ...
- POJ 1751 Highways (最小生成树)
Highways 题目链接: http://acm.hust.edu.cn/vjudge/contest/124434#problem/G Description The island nation ...
- Serializable 剔除某些不想保存的字段 transient
示例: package cn.com.chinatelecom.mms.pojo; import java.io.Serializable; public class Person implement ...
- ckeditor内容保存后显示问题
ckeditor保存到数据库中的数据是html格式,如果要在前台进行显示,需要采用${news.content },这样数据才能进行正常的显示,否则如果采用<s:property value=& ...
- 方法javaJVM学习笔记-内存处理
本文是一篇关于方法java的帖子 大多数JVM将内存区域分离为Method Area(Non-Heap),Heap,Program Counter Register,Java Method Statc ...
- spring读取properties的方法
首先在配置文件中配置PropertyPlaceholderConfigurer 单个配置文件: <bean id="propertyConfigurer" class=&qu ...
- [Oracle] Group By 语句的扩展 - Rollup、Cube和Grouping Sets
常常写SQL语句的人应该知道Group by语句的主要使用方法是进行分类汇总,以下是一种它最常见的使用方法(依据部门.职位分别统计业绩): SELECT a.dname,b.job,SUM(b.sal ...
- android UI进阶之实现listview中checkbox的多选与记录
今天继续和大家分享涉及到listview的内容.在很多时候,我们会用到listview和checkbox配合来提供给用户一些选择操作.比如在一个 清单页面,我们需要记录用户勾选了哪些条目.这个的实现并 ...