package com.jt.report.scheduler; 
 
import java.util.List; 
 
import org.springframework.beans.factory.annotation.Autowired; 
import org.springframework.scheduling.annotation.Scheduled; 
import org.springframework.stereotype.Component; 
import org.springframework.web.bind.annotation.RequestMapping; 
import org.springframework.web.bind.annotation.RequestMethod; 
import org.springframework.web.bind.annotation.ResponseBody; 
 
import com.fasterxml.jackson.annotation.JsonGetter; 
import com.jt.report.entity.Event; 
import com.jt.report.service.SlaveDbService; 
 
@Component 
@RequestMapping("/test") 
public class ReportJobForTest { 
	 
	@Autowired 
	SlaveDbService slaveDbService; 
	 
	 
	@RequestMapping(value = "/slaveEvent", method = RequestMethod.GET) 
	@ResponseBody 
	@JsonGetter 
	public List<Event> test(){ 
		 
		List<Event> list=slaveDbService.getSlaveEvent(null); 
		 
		return list; 
		 
	}	 
	 
} 


发布评论
IT序号网

微信公众号号:IT虾米 (左侧二维码扫一扫)欢迎添加!

JDBC数据源的两种写法知识解答
你是第一个吃螃蟹的人
发表评论

◎欢迎参与讨论,请在这里发表您的看法、交流您的观点。