File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed
src/main/java/com/example/base/domain/user/controller Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change 22
33import com .example .base .domain .user .domain .User ;
44import com .example .base .domain .user .service .UserService ;
5- import lombok .extern .slf4j .Slf4j ;
65import org .springframework .beans .factory .annotation .Autowired ;
6+ import org .springframework .http .HttpStatus ;
7+ import org .springframework .http .ResponseEntity ;
78import org .springframework .web .bind .annotation .GetMapping ;
89import org .springframework .web .bind .annotation .RestController ;
910
@@ -17,7 +18,8 @@ public UserController(UserService userService){
1718 }
1819
1920 @ GetMapping ("/user" )
20- public String createUser (){
21- return this .userService .createUser (new User ()).toString ();
21+ public ResponseEntity createUser (){
22+ String userId = this .userService .createUser (new User ()).toString ();
23+ return new ResponseEntity (userId , HttpStatus .CREATED );
2224 }
2325}
You can’t perform that action at this time.
0 commit comments