首页 > 编程语言 > 详细

springMVC 启动时 加载数据

时间:2015-10-23 11:31:15      阅读:264      评论:0      收藏:0      [点我收藏+]

实现 org.springframework.beans.factory.InitializingBean接口,重写afterPropertiesSet方法

 

public class Servlet implements InitializingBean{
@Autowired
private CustomerMailService customerMailService;

@Override
public void afterPropertiesSet() throws Exception {
// TODO Auto-generated method stub
System.out.println("----------------------------------------------->>>>>");
customerMailService.getCustomerMail();
System.out.println("-------------++++++++++++++++++++----------------->test");
}

 

springMVC 启动时 加载数据

原文:http://www.cnblogs.com/dan-yan/p/4903809.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!