Class AcmeOrderResource


  • @RestController
    @RequestMapping("/api")
    public class AcmeOrderResource
    extends Object
    REST controller for managing AcmeOrder.
    • Constructor Detail

      • AcmeOrderResource

        public AcmeOrderResource​(AcmeOrderService acmeOrderService)
    • Method Detail

      • getAllAcmeOrders

        @GetMapping("/acme-orders")
        @PreAuthorize("hasRole(\"ROLE_ADMIN\")")
        public List<AcmeOrder> getAllAcmeOrders()
        GET /acme-orders : get all the acmeOrders.
        Returns:
        the ResponseEntity with status 200 (OK) and the list of acmeOrders in body.
      • getAcmeOrder

        @GetMapping("/acme-orders/{id}")
        @PreAuthorize("hasRole(\"ROLE_ADMIN\")")
        public org.springframework.http.ResponseEntity<AcmeOrder> getAcmeOrder​(@PathVariable
                                                                               Long id)
        GET /acme-orders/:id : get the "id" acmeOrder.
        Parameters:
        id - the id of the acmeOrder to retrieve.
        Returns:
        the ResponseEntity with status 200 (OK) and with body the acmeOrder, or with status 404 (Not Found).