feat: 들여쓰기
This commit is contained in:
@@ -12,14 +12,14 @@ import org.springframework.web.bind.annotation.RestController;
|
||||
@RequestMapping("/api/hello")
|
||||
public class HelloApiController {
|
||||
|
||||
private final HelloService helloService;
|
||||
private final HelloService helloService;
|
||||
|
||||
@GetMapping
|
||||
public HelloDto.Res hello(HelloDto.Req req) {
|
||||
req.valid();
|
||||
@GetMapping
|
||||
public HelloDto.Res hello(HelloDto.Req req) {
|
||||
req.valid();
|
||||
|
||||
Res res = helloService.sayHello(req);
|
||||
Res res = helloService.sayHello(req);
|
||||
|
||||
return res;
|
||||
}
|
||||
return res;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,29 +8,29 @@ import lombok.Setter;
|
||||
|
||||
public class HelloDto {
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public static class Req {
|
||||
private String id;
|
||||
@Getter
|
||||
@Setter
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public static class Req {
|
||||
private String id;
|
||||
|
||||
public void valid() {
|
||||
if (id == null) {
|
||||
throw new IllegalArgumentException(id);
|
||||
}
|
||||
}
|
||||
public void valid() {
|
||||
if (id == null) {
|
||||
throw new IllegalArgumentException(id);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Getter
|
||||
public static class Res {
|
||||
private String id;
|
||||
private String name;
|
||||
@Getter
|
||||
public static class Res {
|
||||
private String id;
|
||||
private String name;
|
||||
|
||||
@Builder
|
||||
public Res(String id, String name) {
|
||||
this.id = id;
|
||||
this.name = name;
|
||||
}
|
||||
@Builder
|
||||
public Res(String id, String name) {
|
||||
this.id = id;
|
||||
this.name = name;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user