@Test public void getArticleById() throws Exception { mockMvc.perform(get("/api/article/{id}", "uri")).andExpect(status().isOk()); }
@RequestMapping(value = "/article/{uri}", method = RequestMethod.GET) public @ResponseBody Article getArticleById(@PathVariable String uri) { return articleService.findArticleByUri(uri); }
ArticleController extends BaseController { @RequestMapping(value = "/article/{uri}", method = RequestMethod.GET) public @ResponseBody Article getArticleById(@PathVariable String uri) { return articleService.findArticleByUri(uri); } }
ArticleController extends BaseController { @RequestMapping(value = "/article/{uri}", method = RequestMethod.GET) public @ResponseBody Article getArticleById(@PathVariable String uri) { return articleService.findArticleByUri(uri); }  }
ArticleController extends BaseController { @RequestMapping(value = "/article/{uri}", method = RequestMethod.GET) public @ResponseBody Article getArticleById(@PathVariable String uri) { return articleService.findArticleByUri(uri); }  @RequestMapping(value = "/article/{uri}", method = RequestMethod.GET) @ResponseBody Article getArticleById(@PathVariable String uri); @RequestMapping(value = "/article/relevancy/{id}") @ResponseBody List<Article> relevancy(@PathVariable Integer id); @RequestMapping(value = "/articles", method = RequestMethod.GET) @ResponseBody PageOut<ArticleOut> getArticlePage(@RequestParam(required = false) Integer page, @RequestParam(required = false) String column, @RequestParam(required = false) Integer year, @RequestParam(required = false) Integer month); @RequestMapping(value = "/tag", method = RequestMethod.GET) @ResponseBody PageOut<ArticleOut> getArticlesByTag(@RequestParam(required = false) String tag); }
ArticleController extends BaseController { @RequestMapping(value = "/article/{uri}", method = RequestMethod.GET) public @ResponseBody Article getArticleById(@PathVariable String uri) { return articleService.findArticleByUri(uri); }  @RequestMapping(value = "/article/{uri}", method = RequestMethod.GET) @ResponseBody Article getArticleById(@PathVariable String uri); @RequestMapping(value = "/article/relevancy/{id}") @ResponseBody List<Article> relevancy(@PathVariable Integer id); @RequestMapping(value = "/articles", method = RequestMethod.GET) @ResponseBody PageOut<ArticleOut> getArticlePage(@RequestParam(required = false) Integer page, @RequestParam(required = false) String column, @RequestParam(required = false) Integer year, @RequestParam(required = false) Integer month); @RequestMapping(value = "/tag", method = RequestMethod.GET) @ResponseBody PageOut<ArticleOut> getArticlesByTag(@RequestParam(required = false) String tag);  }