This is a multimodule SprintBoot 2.0.3 project in IntelliJ 2018.2.5 Community Edition using: Lombok, Spring-Boot-Starter
Logback is working, maven install gives BUILD SUCCESS and spring-boot:run runs the website successfully.
My parent pom.xml has:
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.0.3.RELEASE</version>
<relativePath/>
</parent>
<modules>
<module>core</module>
<module>console</module>
<module>web</module>
</modules>
<packaging>pom</packaging>
<properties>
<java.version>10</java.version>
</properties>
core pom has:
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter</artifactId>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
</dependency>
And of course spring-boot-starter-logging contains logback-classic.
Despite logging working correctly (console outputs all expected logging messages), Intellij draws red lines on all my classes and causes the distracting "Cannot resolve symbol 'log'" error (perceived error):
I tried adding spring boot's logging depenency manually to my project pom, core pom and web pom but no change in behaviour:
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-logging</artifactId>
</dependency>
IntelliJ is definitely set to Java 10:
What is the proper way to get IntelliJ to recognize that logback is handled by SpringBoot?
Yes indeed. The answer was here: https://stackoverflow.com/a/27430992/921587
Specifically: 1. Preferences -> Build, Execution, Deployment -> Compiler -> Annotation Processors -> Check "Enable annotation processing" (In my case this step appears to have been optional. Critical step was STEP 2) 2. Preferences -> Plugins -> Click -> "Browse repositories" -> Search for Lombok -> Install 3. Resart IntelliJ