springboot关闭druid控制台

yml配置文件里面找到如下三处配置并设置为false:

spring:
    datasource:
        type: com.alibaba.druid.pool.DruidDataSource
        driverClassName: com.mysql.cj.jdbc.Driver
        druid:
            master:
                url: xxx
                username: xxx
                password: xxx
            webStatFilter: 
                #①设置为false
                enabled: false
            statViewServlet:
                #②设置为false
                enabled: false
            filter:
                stat:
                    #③设置为false
                    enabled: false
posted @ 2023-01-28 16:48  xuxianshun  阅读(1463)  评论(0编辑  收藏  举报