alibaba / druid

阿里云计算平台DataWorks(https://help.aliyun.com/document_detail/137663.html) 团队出品,为监控而生的数据库连接池
https://github.com/alibaba/druid/wiki
Apache License 2.0
27.9k stars 8.57k forks source link

SpringBoot+Druid请教配置 #2020

Closed iamchao1129 closed 6 years ago

iamchao1129 commented 6 years ago

如何配置监控地址为"/admin/druid"..

lihengming commented 6 years ago

很简单,使用Druid Spring Boot Starter,在你的配置文件中加入下面配置即可。

spring.datasource.druid.stat-view-servlet.url-pattern=/admin/druid/*

iamchao1129 commented 6 years ago

如此配置在访问/admin/druid/时会跳转到127.0.0.1:8080/druid/login.html (404), 而不是127.0.0.1:8080/admin/druid/login.html

wenshao commented 6 years ago

https://github.com/alibaba/druid/releases/tag/1.1.4 问题已经修复,请使用新版本