package com.weather.domain.prediction;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import javax.validation.Valid;
import java.net.URISyntaxException;
import lombok.extern.slf4j.Slf4j;

/**
 * Created by godong9 on 2017. 7. 29..
 */

@Slf4j
@RestController
public class PredictionController {

    @Autowired
    private PredictionService predictionService;

    @GetMapping("/predictions/init")
    public Prediction readPredictionInit() throws URISyntaxException {
        // TODO: 초기 지도화면 정해진 좌표 10개정도 내려주기!
        return null;
    }

    @GetMapping("/predictions/crawling")
    public void readPredictionList() throws URISyntaxException {
        // TODO: nx, ny 전부 돌면서
        // predictionService.readPrediction(predictionRequestDto);
    }

    @PostMapping("/predictions")
    public Prediction readPrediction(@Valid @RequestBody PredictionRequestDto predictionRequestDto) throws URISyntaxException {
        Prediction prediction = predictionService.readPrediction(predictionRequestDto);
        return prediction;
    }
}

@@ -214,16 +214,40 @@
 eption;%0A
+import java.util.List;%0A%0A
 import l
@@ -1118,11 +1118,191 @@
 n;%0A    %7D
+%0A%0A    @GetMapping(%22/predictions/list%22)%0A    public List%3CPrediction%3E readPredictionList() throws URISyntaxException %7B%0A        // TODO: startNx, startNy, endNx, endNy %EB%B0%9B%EC%95%84%EC%84%9C %EB%B2%94%EC%9C%84 %EA%B2%80%EC%83%89%0A%0A    %7D
 %0A%7D%0A

Update predictionController