Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.


Info
titleProject Lombok

Project Lombok is a java library that automatically plugs into your editor and build tools, spicing up your java.
Never write another getter or equals method again, with one annotation your class has a fully featured builder, Automate your logging variables, and much more.



Panel

이 페이지에는:

Table of Contents



Lombok을 사용하기 위한 방법

> IntelliJ IDEA 또는 Eclipse Plugin 사용

> Maven

POM에 Lombok Plugin 추가

POM

Lombok을 사용하기 위해서 provided scope로 dependency에 다음을 추가합니다.

Code Block
languagexml
linenumberstrue
<dependencies>
	<dependency>
		<groupId>org.projectlombok</groupId>
		<artifactId>lombok</artifactId>
		<version>1.18.12</version>
		<scope>provided</scope>
	</dependency>
</dependencies>

delombok을 위해서 다음을 추가합니다. sourceDirectory 를 지정하지 않으면 src/main/lombok 디렉토리를 사용하게 되며 빌드 과정에서 소스코드를 자동생성합니다.

Code Block
languagexml
linenumberstrue
<plugin>
    <groupId>org.projectlombok</groupId>
    <artifactId>lombok-maven-plugin</artifactId>
    <version>1.18.12.0</version>
    <executions>
        <execution>
            <phase>generate-sources</phase>
            <goals>
                <goal>delombok</goal>
            </goals>
            <configuration>
                <sourceDirectory>src/main/java</sourceDirectory>
            </configuration>
        </execution>
    </executions>
</plugin>

> 다운로드

Attachments


관련 페이지

Content by Label
showLabelsfalse
spacesLOMBOK
showSpacefalse
sorttitle
typepage
cqllabel = "documentation-space-sample" and type = "page" and space = "LOMBOK"
labelsdocumentation-space-sample