SoFunction
Updated on 2025-05-17

Solutions to the failure of Spring Boot lombok annotations in higher version ideas

environment:

IntelliJ IDEA 2024.3.1.1 + Spring Boot + Maven

Problem description

use@AllArgsConstructorAnnotate a user class and then call the full parameter constructor to create the object, an error occurred:

<strong>java: Unable to transfer class The constructor in UserApply to the given type;   need: No parameters   turn up:    ,,,,,   reason: The actual parameter list and the formal parameter list have different lengths</strong>

Solution:

The first method: use the ptg plug-in to automatically generate empty parameter structures, parameter structures, get, set methods

The second method: do not introduce it when the project is created, but directly after the project is created.by<dependency>Introduce the method

The third solution: add lombok annotation1.18.30and delete all the configurations related to lombok in the build below. Note that the version must be 1.18.30.And don't forget to refresh the maven repository.

        <dependency>
            <groupId></groupId>
            <artifactId>lombok</artifactId>
            <version>1.18.30</version>
        </dependency>

The above three methods are sufficient to solve the above problems.

Summarize

This is the article about the solution to the Spring Boot lombok's annotation in the higher version of idea. For more related content about the annotation in the higher version of idea, please search for my previous articles or continue to browse the related articles below. I hope everyone will support me in the future!