|
|
|
@ -1,18 +1,12 @@
|
|
|
|
|
package ru.ulstu.extractor.mvc;
|
|
|
|
|
|
|
|
|
|
import org.springframework.http.HttpStatus;
|
|
|
|
|
import org.springframework.stereotype.Controller;
|
|
|
|
|
import org.springframework.ui.Model;
|
|
|
|
|
import org.springframework.web.bind.annotation.ExceptionHandler;
|
|
|
|
|
import org.springframework.web.bind.annotation.GetMapping;
|
|
|
|
|
import org.springframework.web.bind.annotation.ModelAttribute;
|
|
|
|
|
import org.springframework.web.bind.annotation.PostMapping;
|
|
|
|
|
import org.springframework.web.bind.annotation.ResponseStatus;
|
|
|
|
|
import org.springframework.web.servlet.ModelAndView;
|
|
|
|
|
import ru.ulstu.extractor.mvc.model.EmailForm;
|
|
|
|
|
|
|
|
|
|
import javax.servlet.http.HttpServletRequest;
|
|
|
|
|
|
|
|
|
|
@Controller
|
|
|
|
|
public class GitExtractorController {
|
|
|
|
|
@GetMapping("/")
|
|
|
|
@ -29,15 +23,4 @@ public class GitExtractorController {
|
|
|
|
|
}
|
|
|
|
|
return "result";
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ExceptionHandler(Exception.class)
|
|
|
|
|
@ResponseStatus(HttpStatus.NOT_FOUND)
|
|
|
|
|
public ModelAndView handleResourceNotFoundException(HttpServletRequest req, Exception ex) {
|
|
|
|
|
ModelAndView mav = new ModelAndView();
|
|
|
|
|
mav.addObject("exception", ex);
|
|
|
|
|
mav.addObject("url", req.getRequestURL());
|
|
|
|
|
mav.setViewName("error");
|
|
|
|
|
return mav;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|