pom引入的包版本不对,slf4j-api-1.8.0-alpha0.jar必须要jdk9才能支持(module-模块化是9的特性)。
pom修改如下:
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>1.7.12</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
<version>1.7.2</version>
</dependency>