GpsDataController.java 739 Bytes
package com.bsth.gpsdata.controller;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.bsth.gpsdata.buffer.GpsRealDataBuffer;
import com.bsth.gpsdata.entity.GpsRealData;

@RestController
@RequestMapping("gps")
public class GpsDataController {
	
	@Autowired
	GpsRealDataBuffer gpsBuffer;
	
	@RequestMapping(value = "/real/line/{lineCode}")
	public List<GpsRealData> findByLineCode(@PathVariable("lineCode") Integer lineCode){
		return gpsBuffer.getListByLineCode(lineCode);
	}
}