springboot+druid sql监控没有显示sql语句

springboot + druid 整合的过程中发现,在 druid/sql.html 中没有显示sql,开始以为是配置的问题,后来发现是包的引用错误了。。。。

网上很多的教程都是如下的包:(连接池可以起到作用,但是不会在监控中显示sql)
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>druid</artifactId>
<version>1.0.19</version>
</dependency> 

正确的包

<dependency>
        <groupId>com.alibaba</groupId>
        <artifactId>druid-spring-boot-starter</artifactId>
        <version>1.1.2</version>
    </dependency>

具体的配置就不写了,网上有很多资料

猜你喜欢

转载自blog.csdn.net/wkztselina/article/details/79321735