[Solved] com.alibaba.druid.filter.FilterManager : load filter error, filter not found : sl4j

Problem description

The Druid connection pool is used in the springboot project. When starting the project, the following error message will be printed in the log, but it will not affect the operation of the program:
com.alibaba.druid.filter.filtermanager: load filter error, filter not found: sl4j </ font>

Problem analysis

Open the Druid jar package, and the filter types supported by Druid are in a Druid filters. Properties file, as follows:

druid.filters.default=com.alibaba.druid.filter.stat.StatFilter
druid.filters.stat=com.alibaba.druid.filter.stat.StatFilter
druid.filters.mergeStat=com.alibaba.druid.filter.stat.MergeStatFilter
druid.filters.counter=com.alibaba.druid.filter.stat.StatFilter
druid.filters.encoding=com.alibaba.druid.filter.encoding.EncodingConvertFilter
druid.filters.log4j=com.alibaba.druid.filter.logging.Log4jFilter
druid.filters.log4j2=com.alibaba.druid.filter.logging.Log4j2Filter
druid.filters.slf4j=com.alibaba.druid.filter.logging.Slf4jLogFilter
druid.filters.commonlogging=com.alibaba.druid.filter.logging.CommonsLogFilter
druid.filters.commonLogging=com.alibaba.druid.filter.logging.CommonsLogFilter
druid.filters.wall=com.alibaba.druid.wall.WallFilter
druid.filters.config=com.alibaba.druid.filter.config.ConfigFilter

Solution:

Carefully check your profile as follows:

filters: stat,sl4j,wall

It was found that it was a writing error. Slf4j was written as sl4j and an F was missing. Be careful.

Read More: