ITeye博客

2009 年文章归档

共 3 篇文章

gmail javax.mail.MessagingException: 530 5.7.0 Must issue a STARTTLS command fi

下面是用gmail smtp发送邮件的 import java.util.Properties; import javax.mail.Message; import javax.mail.Session; import javax.mail.Transport; import javax.mail.internet.InternetAddress; import javax.mail.internet.MimeMessage; public class SendMail implements Runnable { private final String smtp_host = "smtp.…

2009-12-16 23:37 · java · Java · .net · SUN · Gmail

CronTrigger配置格式:

格式: 序号 说明 是否必填 允许填写的值 允许的通配符 1 秒 是 0-59 , - * / 2 分 是 0-59 , - * / 3 小时 是 0-23 , - * / 4 日 是 1-31 , - * ? / L W 5 月 是 1-12 or JAN-DEC , - * / 6 周 是 1-7 or SUN-SAT , - * ? / L # 7 年 否 empty 或 1970-2099 , - * / 通配符说明: * 表示所有值. 例如:在分的字段上设置 "*",表示每一分钟都会触发。 ? 表示不指定值。使用的场景为不需要关心当前设置这个字段的值。例如:要在每月的10号触发一个…

2009-12-07 13:44 · Quartz · 工作 · .net · SUN

grails vaidate()与hasErrors区别

现有一个domain如下 class Book { String name Double price static constraints = { name(blank:false,unique:true) price(nullalbe:true) } } 可以用validate()来验证domain的一个实例 def book= new Book() if(book.validate()) { // do something with book } else { book.errors.allErrors.each { println it } } 这时vaidate()方法根据Book的…

2009-11-30 23:31 · grails · Java · Grails