😢 修复Bug

pull/18/head
ruibaby 2018-06-06 20:32:31 +08:00
parent f6e23527dd
commit 122b3a0498
5 changed files with 7 additions and 3 deletions

View File

@ -40,7 +40,7 @@ public class ApiCategoryController {
* @param cateUrl
* @return JsonResult
*/
@GetMapping(value = "/${cateUrl}")
@GetMapping(value = "/{cateUrl}")
public JsonResult categories(@PathVariable("cateUrl") String cateUrl){
Category category = categoryService.findByCateUrl(cateUrl);
if(null!=category){

View File

@ -4,6 +4,7 @@ import cc.ryanc.halo.model.domain.Link;
import cc.ryanc.halo.model.dto.JsonResult;
import cc.ryanc.halo.service.LinkService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
@ -25,6 +26,7 @@ public class ApiLinkController {
*
* @return JsonResult
*/
@GetMapping
public JsonResult links(){
List<Link> links = linkService.findAllLinks();
if(null!=links && links.size()>0){

View File

@ -4,6 +4,7 @@ import cc.ryanc.halo.model.domain.Menu;
import cc.ryanc.halo.model.dto.JsonResult;
import cc.ryanc.halo.service.MenuService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
@ -25,6 +26,7 @@ public class ApiMenuController {
*
* @return JsonResult
*/
@GetMapping
public JsonResult menus(){
List<Menu> menus = menuService.findAllMenus();
if(null!=menus && menus.size()>0){

View File

@ -53,7 +53,7 @@ public class ApiPostController {
* @param postUrl
* @return JsonResult
*/
@GetMapping(value = "/posts/${postUrl}")
@GetMapping(value = "/posts/{postUrl}")
public JsonResult posts(@PathVariable(value = "postUrl") String postUrl){
Post post = postService.findByPostUrl(postUrl,HaloConst.POST_TYPE_POST);
if(null!=post){

View File

@ -43,7 +43,7 @@ public class ApiTagController {
* @param tagUrl tagUrl
* @return JsonResult
*/
@GetMapping(value = "/${tagUrl}")
@GetMapping(value = "/{tagUrl}")
public JsonResult tags(@PathVariable("tagUrl") String tagUrl){
Tag tag = tagService.findByTagUrl(tagUrl);
if(null!=tag){