使用druid数据源 import org.springframework.boot.autoconfigure.jdbc.DataSourceBuilder标红

查后发现是新版本改了:
In latest springframework, this org.springframework.boot.autoconfigure.jdbc.DataSourceBuilder has been moved to org.springframework.boot.jdbc.DataSourceBuilder. so you have to edit in import

And then you will notice that you have to use DataSourceBuilder.create(classLoader) instead of new DataSourceBuilder(classLoader)

所以解决方案就是换成 org.springframework.boot.jdbc.DataSourceBuilder

参考链接

你可能感兴趣的:(使用druid数据源 import org.springframework.boot.autoconfigure.jdbc.DataSourceBuilder标红)