File tree 1 file changed +3
-2
lines changed
src/main/java/dev/nicklatcham/shopthing/vehicle
1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change 4
4
5
5
import org .slf4j .Logger ;
6
6
import org .slf4j .LoggerFactory ;
7
- import org .springframework .beans .factory .annotation .Autowired ;
8
7
import org .springframework .http .ResponseEntity ;
9
8
import org .springframework .web .bind .annotation .GetMapping ;
10
9
import org .springframework .web .bind .annotation .PathVariable ;
19
18
@ RestController
20
19
@ RequestMapping ("/api/vehicles" )
21
20
public class VehicleController {
21
+
22
22
private final VehicleService vehicleService ;
23
23
private static final Logger logger = LoggerFactory .getLogger (VehicleController .class );
24
24
@@ -42,7 +42,8 @@ public ResponseEntity<Vehicle> getVehicleById(@PathVariable final Long id) {
42
42
@ PostMapping
43
43
public ResponseEntity <?> createVehicle (@ Valid @ RequestBody Vehicle newVehicle ) {
44
44
final Vehicle created = vehicleService .createVehicle (newVehicle );
45
- logger .debug (STR ."Created Vehicle: \{newVehicle .toString ()}" );
45
+ logger .debug ("Created Vehicle: {}" , newVehicle .toString ());
46
+
46
47
return ResponseEntity .status (201 ).body (created );
47
48
}
48
49
You can’t perform that action at this time.
0 commit comments