Commit 65b07337 by 段启岩

controller添加api前缀

parent 258aa545
......@@ -13,10 +13,7 @@ import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.BindingResult;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.*;
import javax.validation.Valid;
......@@ -26,6 +23,7 @@ import javax.validation.Valid;
*/
@Api(tags = "CMS内容API")
@RestController
@RequestMapping("/api")
public class ContentApi {
private IContentService contentService;
......@@ -44,7 +42,7 @@ public class ContentApi {
*/
@Anonymous
@ApiOperation("内容列表")
@GetMapping("/api/channel/{channelId}/contents")
@GetMapping("/channel/{channelId}/contents")
public Response getContentPage(@PathVariable("channelId") Integer channelId,
@RequestParam("type") Integer contentType,
@Valid PageForm pageForm, BindingResult bindingResult) {
......@@ -64,7 +62,7 @@ public class ContentApi {
@Anonymous
@ApiOperation("内容详情")
@GetMapping("/api/content/{contentId}")
@GetMapping("/content/{contentId}")
public Response<ContentDetail> getContentDetail(@PathVariable("contentId") Integer contentId) {
try {
......
......@@ -27,6 +27,7 @@ import javax.validation.Valid;
*/
@Api(tags = "项目API")
@RestController
@RequestMapping("/api")
public class ProjectApi {
private IProjectService projectService;
......
......@@ -25,6 +25,7 @@ import javax.validation.Valid;
*/
@Api(tags = "项目评论API")
@RestController
@RequestMapping("/api")
public class ProjectCommentApi {
private IProjectCommentService projectCommentService;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment