본문 바로가기

Programming/SpringBoot

[SpringBoot]간단한 게시판 만들기

Ref

https://nyyang.tistory.com/123

https://devlog-wjdrbs96.tistory.com/209

 

start.spring.io 를 이용해 생성함

GENERATE 한 뒤에 build.gradle을 불러왔다.

 

 

2. Lombok 사용을 위한 설정

 

**Lombok이란 무엇인가?

-> 보통 DTO나 Model, Entity의 경우 여러 속성(Attribute)이 존재하고, 이들이 가지는 property에 대해 Getter, Setter, 생성자들을 매번 작성해주어야 하는데 이러한 부분을 자동으로 만들어주는 Library라고 할 수 있다. 

Lombok이 없다면 Getter, Setter, 생성자 등을 매번 직접 작성해주어야하고, 변수의 이름이 바뀐다고 하면 직접 바꾸어주어야하는 번거로움을 줄일 수 있다.

 

 

 

3. Docker로 MySQL 생성하기 (Docker-compose)