In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/02 Report--
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.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.