类 SnippetController
- java.lang.Object
-
- io.edurt.datacap.server.controller.user.SnippetController
-
@RestController @RequestMapping("/api/v1/snippet") public class SnippetController extends Object
-
-
构造器概要
构造器 构造器 说明 SnippetController(SnippetService snippetService)
-
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 Response<Long>delete(Long id)Response<PageEntity<SnippetEntity>>getAll(int start, int end)Response<SnippetEntity>getInfo(Long id)Response<SnippetEntity>save(SnippetEntity configure)Response<SnippetEntity>update(SnippetEntity configure)
-
-
-
构造器详细资料
-
SnippetController
public SnippetController(SnippetService snippetService)
-
-
方法详细资料
-
getAll
@GetMapping public Response<PageEntity<SnippetEntity>> getAll(@RequestParam(value="page",defaultValue="1") int start, @RequestParam(value="size",defaultValue="10") int end)
-
save
@PostMapping(produces="application/json") public Response<SnippetEntity> save(@RequestBody @Validated(Create.class) SnippetEntity configure)
-
update
@PutMapping(produces="application/json") public Response<SnippetEntity> update(@RequestBody @Validated(Update.class) SnippetEntity configure)
-
delete
@PreAuthorize("@snippetAuthorize.validateById(#id)") @DeleteMapping("{id}") public Response<Long> delete(@PathVariable("id") Long id)
-
getInfo
@GetMapping("{id}") public Response<SnippetEntity> getInfo(@PathVariable("id") Long id)
-
-