Get the App
SLTechnology News&Howtos  ›  Internet Technology  › 

What is the integrated Druid configuration in SpringBoot2?

Shulou Source: shulou.com Published: 2022-06-02 03:33:36 10月02日 Update

SpringBoot2 integrated Druid configuration is how, many novices are not very clear about this, in order to help you solve this problem, the following editor will explain for you in detail, people with this need can come to learn, I hope you can gain something.

Maven com.alibaba druid-spring-boot-starter 1.1.1312345 configure application.properties# set the port number of the project server.port=9081# set the project name server.servlet.context-path=/mixmall# database information spring.datasource.type=com.alibaba.druid.pool.DruidDataSourcespring.datasource.url = jdbc:mysql://localhost:3306/java10?useSSL=false&serverTimezone=Asia/Shanghaispring.datasource.username = rootspring.datasource.password = Java20190713*yyspring.datasource.driverClassName = com.mysql.cj .jdbc.Driverspring.jpa.database = MYSQL# spring.jpa.show-sql = true indicates that the configuration of the sql statement spring.jpa.show-sql = truespring.jpa.hibernate.ddl-auto = update# druid that will be printed on the console is spring.datasource.druid.initial-size=5spring.datasource.druid.max-active=20spring.datasource.druid.min-idle=5spring.datasource.druid.max-wait=60000spring.datasource.druid.validation-query=SELECT 1spring.datasource.druid.validationMauqueryluthout2000 spring.datasource.druid.timecolor between.jdbc.Driverspring.jpa.database = jdbc.Driverspring.jpa.database = jpa.database = jdbc.Driverspring.jpa.database = jdbc.database = jpa.database = jpa. Eviction-runs-millis=60000spring.datasource.druid.min-evictable-idle-time-millis=300000# configures filters for monitoring statistics interception After the monitoring interface is removed, the sql cannot be counted. 'wall' is used for firewall spring.datasource.druid.filters= stat,wall# monitoring configuration # WebStatFilter configuration. For instructions, please see Druid Wiki Configure _ configure WebStatFilterspring.datasource.druid.web-stat-filter.enabled=truespring.datasource.druid.web-stat-filter.url-pattern=/*spring.datasource.druid.web-stat-filter.exclusions=/druid/*,*.js,*.gif,*.jpg,*.bmp,*.png,*.css * .icospring.datasource.druid.web-stat-filter.session-stat-enable=truespring.datasource.druid.web-stat-filter.session-stat-max-count=10spring.datasource.druid.web-stat-filter.principal-session-name=session_namespring.datasource.druid.web-stat-filter.principal-cookie-name=cookie_namespring.datasource.druid.web-stat-filter.profile-enable=# StatViewServlet configuration For instructions, please refer to Druid Wiki Configure _ StatViewServlet configure default falsespring.datasource.druid.stat-view-servlet.enabled=true# configuration DruidStatViewServletspring.datasource.druid.stat-view-servlet.url-pattern=/druid/*# disable the "Reset All" function on the HTML page spring.datasource.druid.stat-view-servlet.reset-enable=false# monitoring page login user name spring.datasource.druid.stat-view-servlet.login-username=admin# monitoring page login password spring.datasource.druid.stat-view- Servlet.login-password=123456#IP whitelist (not configured or empty Allow all access) spring.datasource.druid.stat-view-servlet.allow=127.0.0.1192.168.0.119#IP blacklist (if there is common, deny takes precedence over allow) spring.datasource.druid.stat-view-servlet.deny=#Spring monitoring configuration, please refer to Druid Github Wiki, configure _ Druid and Spring associated monitoring configuration spring.datasource.druid.aop-patterns= com.zz.service.*

test

Http://localhost:9081/mixmall/druid/index.html

Is it helpful for you to read the above content? If you want to know more about the relevant knowledge or read more related articles, please follow the industry information channel, thank you for your support.

Tags: Configuration monitoring page reference help login statistics centralization clarity information content function slogan list name password for this project console data Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Shulou Technology Apple Redmi NVidia OPPO Reno