File tree Expand file tree Collapse file tree
java/com/waitit/capstone/domain/client/manager Expand file tree Collapse file tree Original file line number Diff line number Diff line change 88import org .springframework .http .HttpStatus ;
99import org .springframework .http .ResponseEntity ;
1010import org .springframework .web .bind .annotation .GetMapping ;
11+ import org .springframework .web .bind .annotation .PathVariable ;
1112import org .springframework .web .bind .annotation .PostMapping ;
1213import org .springframework .web .bind .annotation .RequestBody ;
1314import org .springframework .web .bind .annotation .RequestMapping ;
1415import org .springframework .web .bind .annotation .RequestParam ;
16+ import org .springframework .web .bind .annotation .RestController ;
1517
1618@ AllArgsConstructor
1719@ RequestMapping ("/host" )
20+ @ RestController
1821public class HostController {
1922 private final HostService hostService ;
2023
@@ -30,8 +33,8 @@ public ResponseEntity<?> saveHost(@RequestBody HostRequest request){
3033 return ResponseEntity .status (HttpStatus .CREATED ).body (responseBody );
3134 }
3235
33- @ GetMapping
34- public ResponseEntity <HostResponse > getHost (@ RequestParam Long id ){
36+ @ GetMapping ( "/{id}" )
37+ public ResponseEntity <HostResponse > getHost (@ PathVariable Long id ){
3538 HostResponse response = hostService .getHost (id );
3639 return ResponseEntity .status (HttpStatus .OK ).body (response );
3740 }
Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ spring.datasource.username=${SPRING_DATASOURCE_USERNAME}
88spring.datasource.password =${SPRING_DATASOURCE_PASSWORD}
99
1010# hibernate
11- spring.jpa.hibernate.ddl-auto =create
11+ spring.jpa.hibernate.ddl-auto =none
1212spring.jpa.hibernate.naming.physical-strategy =org.hibernate.boot.model.naming.PhysicalNamingStrategyStandardImpl
1313
1414# jwt secret key
You can’t perform that action at this time.
0 commit comments