idea error: (79, 13) java: find symbol symbol: variable log location: class run.halo.app.model.enums.datatype; idea given project import

first step:

IDEA at compile time newspaper Error: (30, 17) java : can not find symbol symbol: variable log
  Error: (30, 17) java : can not find symbol
  symbol: variable log
  location: class com.mokerson.rabbitmq.config .RabbitMqConfig

 

 

This is because the use of @ Slf4j comment or @ Log4j2 this way logging. But using annotation mode, it is necessary to plug the project introduced lombok, following the introduction of this plugin describes two ways;

The first method: directly adding POM-dependent

Add in the POM file

<dependency>
     <groupId>org.projectlombok</groupId>
     <artifactId>lombok</artifactId>
     <version>1.16.20</version>
</dependency>

The second method: Add Lombok plug

Click File in the IDEA - "Settings -" Plugins, enter Lombok, Lombok choose to install the Installed

 

 

If the above are not resolved then try this solution, of course, it is a prerequisite

If you are using the project SpringBoot built, then it will try its version deleted because SpringBoot parent POM file has been defined in the appropriate version of Lombok.

 

 

The third method: modify the configuration

If the above solutions do not solve the problem, this time to look at the bottom right corner of the error message contains this and if there is then the problem is not caused by the configuration

After the installation is complete Lombok, when you start the project  Lombok Requires Annotation Processing error of
Here Insert Picture Description

16:08	Lombok Requires Annotation Processing
	Annotation processing seems to be disabled for the project "leyou". For the plugin to function correctly, please enable it under "Settings > Build > Compiler > Annotation Processors" 

 

solution

Click setting -> Build, Execution, Deployment -> Annotation Processors open the edit page, tick Enable annotation processing on the front of the hook, you need to restart after saving IDEA
Here Insert Picture Description

 

Guess you like

Origin www.cnblogs.com/cnndevelop/p/12651990.html