@ Slf4j be omitted private static final org.slf4j.Logger log = org.slf4j.LoggerFactory.getLogger (LogExample.class);
Variables can be used directly to print more info log level of a log, debug default does not print;
log variables need to introduce packages lombok
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<optional>true</optional>
</dependency>
sts, eclipse simply lombok jar package into the root directory on it, idea lombok need to install plug-ins
SpringToolSuite4.ini then add:
-Xbootclasspath/a:lombok1.18.4.jar
-javaagent:lombok1.18.4.jar
Can restart