-2

I am getting cannot resolve symbol for the following in my intelliJ project:

Data, Lombok, Component, beans, http, util

My Class

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

@Component
@ConfigurationProperties("c")
@Data
public class CP {

private String maxTasks;
private String subscribeTo;

}

My POM

<dependencies>
    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-web</artifactId>
    </dependency>
    
    <dependency>
        <groupId>org.slf4j</groupId>
        <artifactId>slf4j-simple</artifactId>
        <version>1.6.1</version>
    </dependency>
    <dependency>
        <groupId>org.projectlombok</groupId>
        <artifactId>lombok</artifactId>
        <version>1.18.12</version>
    </dependency>
    
Shaz
  • 1
  • 3

2 Answers2

0

Try File -> Settings -> search for “Annotations” -> Enable annotations -> Select the “Enable annnotations”

Apply and Ok and then restart IntelliJ once.

Suman
  • 818
  • 6
  • 17
0

To make work propertly lombok on intellij it is necessary to use the extension

https://plugins.jetbrains.com/plugin/6317-lombok

ferroblesh
  • 101
  • 3
  • Hi how do I use that extention? – Shaz Aug 12 '20 at 07:11
  • Once you install it then the IDE will provide you the intellisense on the bean. If you use eclipse you should include another extension also to be able to use lombok – ferroblesh Aug 12 '20 at 22:49