@IocBean(name = "emailService")
public class EmailService {
private static final Log log = Logs.get();
@Inject("refer:$ioc")
protected Ioc ioc;
public boolean send(String to, String subject, String html) {
try {
HtmlEmail email = ioc.get(HtmlEmail.class);
email.setSubject(subject);
email.setHtmlMsg(html);
email.addTo(to);
email.buildMimeMessage();
email.sendMimeMessage();
return true;
} catch (Throwable e) {
log.info("send email fail", e);
return false;
}
}
}
这代码里面的HtmlEmail是什么时候注入的?,这代码在入门手册里面有的!表示不懂什么时候就注入了,哪里写了相关的注入?