Springboot+maven integrated Lombok simplifies code

Source: Internet
Author: User

Please go to the official website to download lombok:https://projectlombok.org/

I saw on the official website that it was directly double-clicking the jar package to automatically scan the Eclipse installation directory, but I still have myeclipse on my computer.

So just do it manually.

1. Place the downloaded jar package in the Eclipse installation directory

2. At the bottom of the Eclipse.ini, add the following configuration

-xbootclasspath/a:lombok.jar-javaagent:lombok.jar

3. Restart Eclipse to introduce Lombok dependencies in the MAVEN project

<dependency>    <groupId>org.projectlombok</groupId>    <artifactid>lombok</ artifactid>    <version>1.18.0</version>    <scope>provided</scope></ Dependency>

4. Test, as you can call directly to the get and set methods

 

Summary: Just started to make a direct lombox dependence, and then test, how to test is not working, finally found the problem, you must first configure the Lombok to be able. It's easy for beginners to make mistakes.

Springboot+maven integrated Lombok simplifies code

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.