Live Template
Live Template ์ค์
- Preference โ Live Template ๋ฅผ ํด๋ฆญํฉ๋๋ค.



Template ์์ค
Controller
import lombok.RequiredArgsConstructor;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;
@RequestMapping("/$END$")
@Controller
@RequiredArgsConstructor
public class $METHOD_NAME$ {
@GetMapping
public ResponseEntity<?> get() {
return new ResponseEntity<>(HttpStatus.OK);
}
@PostMapping
public ResponseEntity<?> post() {
return new ResponseEntity<>(HttpStatus.OK);
}
@PutMapping
public ResponseEntity<?> put() {
return new ResponseEntity<>(HttpStatus.OK);
}
@DeleteMapping
public ResponseEntity<?> delete() {
return new ResponseEntity<>(HttpStatus.OK);
}
}
Serivce
import lombok.RequiredArgsConstructor;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Service;
@Service
@RequiredArgsConstructor
public class $METHOD_NAME$ implements $END${
}
Repository
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Repository;
@Repository
@RequiredArgsConstructor
public class $METHOD_NAME${
$END$
}
Tdd
@org.junit.jupiter.api.Test
@org.junit.jupiter.api.DisplayName("$END$")
void $METHOD_NAME$() {
org.assertj.core.api.Assertions.assertThat(1).isEqualTo(1);
}
METHOD_NAME ๋ณ์ ์ ์


- METHOD_NAME์ fileNameWithoutExtension() ์ผ๋ก ์ ์ํฉ๋๋ค.
- Tdd์ ๋ณ์ ์ ์๋ ClassName() ์ผ๋ก ์ ์ํฉ๋๋ค.

- Java์์ ์ฌ์ฉ ํ๋ ๊ฒ์ผ๋ก ์ค์ ์ ํฉ๋๋ค.
์ฌ์ฉ๋ฒ
- ์ค์ ํ ๋จ์ถํค๋ฅผ ์์ฑํ๊ณ ์ํฐ๋ฅผ ๋๋ฌ์ฃผ๋ฉด ์ ์ํ๋ Template์ด ์์ฑ๋ฉ๋๋ค.

