Use the plug-in spring-boot-maven-plugin to report Failed to load class Sl4j errors

Today, an error occurred when compiling, unable to load StaticLoggerBinder, so the default implementation

was used.
[INFO] --- spring-boot-maven-plugin:2.1.0.RELEASE:repackage (repackage) @ nettyServer ---
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html-sharpStaticLoggerBinder for further details.

slf4j"s official website says that it doesn"t know which slf4j to use. Just declare it, but it"s no use adding a declaration to the dependency

.
                    <dependency>
                        <groupId>org.slf4j</groupId>
                        <artifactId>slf4j-nop</artifactId>
                        <version>1.7.25</version>
                    </dependency>
Apr.19,2022

now that you know how to fix this problem, the dependencies of the plug-in should be written in the plug-in

            <plugin>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
                <dependencies>
                    <dependency>
                        <groupId>org.slf4j</groupId>
                        <artifactId>slf4j-nop</artifactId>
                        <version>1.7.25</version>
                    </dependency>
                </dependencies>
            </plugin>

 1. 
Menu