SpringBoot basics -- output log error Required type: Supplier <java.lang.String> Provided: String

logger.trace("这是trace日志");
        logger.debug("debug日志");
        logger.info("info日志");
        logger.warn("warn日志");
        logger.error("error日志");

insert image description here

solution

Import package error, remove the above two packages, import the following two packages

//import org.junit.platform.commons.logging.Logger;
//import org.junit.platform.commons.logging.LoggerFactory;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

Guess you like

Origin blog.csdn.net/qq_44660367/article/details/107416343