no message

main
이범준 1 year ago
parent e9249a9029
commit f971cf0b3f

@ -1,38 +1,21 @@
package cokr.xit; package cokr.xit;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller; import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView; import org.springframework.web.servlet.ModelAndView;
import org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping; import org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping;
import cokr.xit.foundation.data.DataObject;
import cokr.xit.foundation.web.AbstractController; import cokr.xit.foundation.web.AbstractController;
import cokr.xit.foundation.web.RequestHandlerReader;
@Controller @Controller
public class MainController extends AbstractController { public class MainController extends AbstractController {
@Autowired @Autowired
private RequestMappingHandlerMapping requestHandlers; private RequestMappingHandlerMapping requestHandlers;
@GetMapping(name="로그인", value="/login.do")
public String loginPage() {
return "login";
}
@GetMapping(name="홈", value={"/", "/index.do"}) @GetMapping(name="홈", value={"/", "/index.do"})
public ModelAndView mainPage() { public ModelAndView mainPage() {
return new ModelAndView("index"); return new ModelAndView("index");
} }
@RequestMapping(name="기능 URL 선택", value="/urls.do")
public ModelAndView getURLs(boolean multiple) {
List<DataObject> urls = new RequestHandlerReader().read(requestHandlers);
return new ModelAndView("select-url")
.addObject("multiple", multiple)
.addObject("urls", toJson(urls));
}
} }
Loading…
Cancel
Save