package ru.ulstu.grant.controller; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; import ru.ulstu.configuration.Constants; import ru.ulstu.grant.service.GrantService; import java.io.IOException; import java.text.ParseException; import static ru.ulstu.paper.controller.PaperRestController.URL; @RestController @RequestMapping(URL) public class GrantRestController { public static final String URL = Constants.API_1_0 + "grants"; private final GrantService grantService; public GrantRestController(GrantService grantService) { this.grantService = grantService; } @GetMapping("/grab") public void grab() throws IOException, ParseException { grantService.createFromKias(); } }