📄 emailnotifier.java
字号:
/*******************************************************************
<br>Copyright (C), 2005-2008, yeeku.H.Lee
<br>Program Name:
<br>Author:yeeku.H.lee kongyeeku@163.com
<br>Version:1.0
<br>This program is protected by copyright laws.
<br>Date:
*******************************************************************/
package lee;
import org.springframework.context.ApplicationListener;
import org.springframework.context.ApplicationEvent;
public class EmailNotifier implements ApplicationListener
{
public void onApplicationEvent(ApplicationEvent evt)
{
if (evt instanceof EmailEvent)
{
//发送email通知...
EmailEvent emailEvent = (EmailEvent)evt;
System.out.println("需要发送邮件的接收地址 " + emailEvent.address);
System.out.println("需要发送邮件的邮件正文 " + emailEvent.text);
}
else
{
System.out.println("容器本身的事件 " + evt);
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -