1
0
mirror of https://gitee.com/bookshelfplus/bookshelfplus synced 2025-09-13 04:01:40 +08:00
Code Issues Projects Releases Wiki Activity GitHub Gitee

引入Swagger

This commit is contained in:
2022-03-13 01:23:43 +08:00
parent 1b78102d61
commit 5f3dab8153
5 changed files with 81 additions and 0 deletions

View File

@@ -1,5 +1,8 @@
package plus.bookshelf.Controller.Controller;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
@@ -11,6 +14,7 @@ import plus.bookshelf.Controller.VO.BookVO;
import plus.bookshelf.Service.Model.BookModel;
import plus.bookshelf.Service.Service.BookService;
@Api(value = "书籍")
@Controller("book")
@RequestMapping("/apiv1/book")
public class BookController extends BaseController {
@@ -18,6 +22,8 @@ public class BookController extends BaseController {
@Autowired
BookService bookService;
@ApiOperation(value = "获取书籍信息",notes = "获取书籍信息")
// @ApiImplicitParam(name = "book", value = "图书详细实体", required = true, dataType = "Book")
@RequestMapping(value = "get", method = {RequestMethod.GET})
@ResponseBody
public BookVO get(@RequestParam(value = "id") Integer id) {