Class ProductController
java.lang.Object
hu.rts.mike.example.dev.crm.rest.controller.ProductController
@RestController
@RequestMapping("/api/product")
@PreAuthorize("isAuthenticated()")
public class ProductController
extends Object
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final org.modelmapper.ModelMapperprivate final ProductService -
Constructor Summary
ConstructorsConstructorDescriptionProductController(ProductService service, org.modelmapper.ModelMapper mapper) -
Method Summary
Modifier and TypeMethodDescriptioncreate(ProductDto dto) voiddeleteById(IdListDto<Integer> dto) org.springframework.data.domain.Page<ProductDto>update(ProductDto dto)
-
Field Details
-
service
-
mapper
private final org.modelmapper.ModelMapper mapper
-
-
Constructor Details
-
ProductController
-
-
Method Details
-
table
@GetMapping @PreAuthorize("hasAuthority(\'READ_PRODUCT\')") public org.springframework.data.domain.Page<ProductDto> table(@RequestParam(value="page",defaultValue="0") int page, @RequestParam(value="size",defaultValue="20") int size, @RequestParam(value="sort",required=false) List<String> sorts, @RequestParam(value="filter",required=false) List<String> filterString) -
getById
@GetMapping("{id}") @PreAuthorize("hasAuthority(\'READ_PRODUCT\')") public ProductDto getById(@PathVariable("id") Integer id) -
deleteById
-
create
@PostMapping @PreAuthorize("hasAuthority(\'CREATE_PRODUCT\')") public ProductDto create(@RequestBody ProductDto dto) -
update
@PutMapping @PreAuthorize("hasAuthority(\'UPDATE_PRODUCT\')") public ProductDto update(@RequestBody ProductDto dto)
-