■ 무작정 Spring Boot 만들기

- Spring Boot
- Name ⇒ Project 이름
- Location ⇒ 경로
- Language ⇒ 사용 언어
- Type ⇒ 라이브러리 사용 타입?

- File → Settings

- Plugins 선택 → Marketplace 선택
- Install 되어 있으면 체크 박스 표시가 된다.

- 검색하기
- Lombok
- Spring Boot DevTools
- Spring Web
- Mustache
- Spring Data JAP
- H2 Database
- 해당 6개 Install 눌러주기.(체크 표시 있으면 OK)
- 완료 후 Create 클릭

// 라이브러리
dependencies {
implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
implementation 'org.springframework.boot:spring-boot-starter-mustache'
implementation 'org.springframework.boot:spring-boot-starter-web'
compileOnly 'org.projectlombok:lombok'
developmentOnly 'org.springframework.boot:spring-boot-devtools'
runtimeOnly 'com.h2database:h2'
annotationProcessor 'org.projectlombok:lombok'
testImplementation 'org.springframework.boot:spring-boot-starter-test'
testRuntimeOnly 'org.junit.platform:junit-platform-launcher'
}
- dependencies ⇒ 클라우드에 저장해놓고 ‘ ’ 에 문자를 적어주면 자동으로 다운로드 시켜준다.

- templates 폴더에 .keep 파일을 만들어주고 board 폴더를 만들어서 mustache파일을 옮겨주자
- 이유는 저렇게 안하면 폴더 트리가 깨져서 나중에 templates 폴더를 사용 못하게된다.
- shift + f6 으로 이름 변경 가능
- mustache로 확장자를 바꿔준다.
- static 폴더는 정적
- templates 폴더는 동적

- Handlebars/Mustache 도 Install 해주자.

- 저장할때 자동정렬 시켜준다.
- Actions on Save 검색
- Reformat code 체크
- Optimize imports 체크
- 완료 후 OK 버튼 클릭
Share article