Spring

Gradle annotationProcessor

91cm 2019. 9. 7. 15:31


annotationProcessor

- 컴파일 시점으로 코드를 생성함.

-이것을 설정안하면 롬북을 포함해서 프로젝트를 export할 때 롬북에서의 제공되는 에노테이션이 전부 포함되지 않음




dependencies {
implementation 'org.springframework.boot:spring-boot-starter-freemarker'
implementation 'org.springframework.boot:spring-boot-starter-web'


compileOnly 'org.projectlombok:lombok'
annotationProcessor 'org.projectlombok:lombok'
testImplementation 'org.springframework.boot:spring-boot-starter-test'
)
}



참고 : https://medium.com/@iammert/annotation-processing-dont-repeat-yourself-generate-your-code-8425e60c6657