其他分享
首页 > 其他分享> > spring boot 注解

spring boot 注解

作者:互联网

@Api(value = "谢谢谢谢", tags = "惺惺惜惺惺")
@RestController
@RequestMapping(UrlConstant.TIKTOK + "store/live")
@RequiredArgsConstructor
public class StoreLiveController {

  private final StoreLiveService storeLiveService;
  private final TiktokRequest2Service tiktokRequest2Service;
  private final StoreService storeService;
  private final TiktokRequestService tiktokRequestService;

  @ApiOperation(value = "谢谢谢谢谢谢", tags = "v3.9.5")
  @PostMapping(value = "/list", produces = MediaType.APPLICATION_JSON_VALUE)
  //    @PermissionAccess(value = Permission.STORE_INFO_GOODS_LIST, cls =
  // DefaultPermissionMethod.class)
  public JsonMessage<ApiPagination<EsStoreLiveData, StoreRelationListVo>> getStoreLiveList(
      @RequestBody @Valid ApiPagination<EsStoreLiveData, StoreRelationListVo> pagination)
      throws IOException {
    List<EsStoreLiveData> list = storeLiveService.getStoreLiveList(pagination);
    return new JsonMessage<>(200, "", pagination);
  }

 

1.@RequiredArgsConstructor  替代 @Autowired注解 但是类必须用final 修饰

2.@RestController 是@controller和@ResponseBody 的结合

3.@Api: 用在请求的类上,表示对类的说明

4.

标签:pagination,谢谢,tags,spring,boot,private,value,注解,final
来源: https://www.cnblogs.com/elsons/p/16262795.html