Class CategoryController

java.lang.Object
com.malay.shortyshoe.controller.CategoryController

@RestController @RequestMapping("api/category") public class CategoryController extends Object
  • Constructor Details

    • CategoryController

      public CategoryController()
  • Method Details

    • getAllCtegory

      @GetMapping("/") public org.springframework.http.ResponseEntity<List<Category>> getAllCtegory()
    • getCategoryById

      @GetMapping("/{id}") public Category getCategoryById(@PathVariable int id)
    • CreateCategory

      @PostMapping("/") public org.springframework.http.ResponseEntity<Category> CreateCategory(@RequestBody Category category)
    • updateCategory

      @PutMapping("/{id}") public org.springframework.http.ResponseEntity<Category> updateCategory(@PathVariable int id, @RequestBody Category updatedCategory) throws BusinessException
      Throws:
      BusinessException
    • deleteCategory

      @DeleteMapping("/{id}") public org.springframework.http.ResponseEntity<Void> deleteCategory(@PathVariable int id) throws BusinessException
      Throws:
      BusinessException