You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 4 Next »

Project 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.

이 페이지에는:


Lombok을 사용하기 위한 방법

> IntelliJ IDEA 또는 Eclipse Plugin 사용

> Maven POM

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

<dependencies>
	<dependency>
		<groupId>org.projectlombok</groupId>
		<artifactId>lombok</artifactId>
		<version>1.18.12</version>
		<scope>provided</scope>
	</dependency>
</dependencies>

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

<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>

> 다운로드

No files shared here yet.


관련 페이지

  • No labels