Fixing CallableCarController
authorGustavo Martin Morcuende <gu.martinm@gmail.com>
Sun, 11 Dec 2016 17:51:57 +0000 (18:51 +0100)
committerGustavo Martin Morcuende <gu.martinm@gmail.com>
Sun, 11 Dec 2016 17:51:57 +0000 (18:51 +0100)
SpringJava/RxJava/web-services-spring-rxjava-server/src/main/java/de/spring/webservices/rest/controller/CallableCarController.java

index 3092943..c989cdc 100644 (file)
@@ -29,7 +29,7 @@ import de.spring.webservices.rest.business.service.AwesomeBusinessLogic;
 @RestController
 @RequestMapping("/api/callable/cars/")
 public class CallableCarController {
-       private static final Logger LOGGER = LoggerFactory.getLogger(DeferrableCarController.class);
+       private static final Logger LOGGER = LoggerFactory.getLogger(CallableCarController.class);
        private static final int PAGE = 2;
        private static final int PAGE_SIZE = 10;
     
@@ -146,7 +146,7 @@ public class CallableCarController {
                        Car createdCar = awesomeBusinessLogic.create(car);
                
                HttpHeaders headers = new HttpHeaders();
-               headers.add(HttpHeaders.LOCATION, "/api/cars/" + createdCar.getId());
+               headers.add(HttpHeaders.LOCATION, "/api/callable/cars/" + createdCar.getId());
                return new ResponseEntity<>(createdCar, headers, HttpStatus.CREATED);
                };