当前位置: 首页 > news >正文

博望网站建设惠州做棋牌网站建设哪家便宜

博望网站建设,惠州做棋牌网站建设哪家便宜,网站上面怎么做链接,东莞人才市场招聘官网背景 Druid连接池是阿里巴巴开源的数据库连接池项目。Druid连接池为监控而生#xff0c;内置强大的监控功能#xff0c;监控特性不影响性能。功能强大#xff0c;能防SQL注入#xff0c;内置Loging能诊断Hack应用行为。现在已经SpringBoot3#xff0c;Druid的配置也需要随…背景 Druid连接池是阿里巴巴开源的数据库连接池项目。Druid连接池为监控而生内置强大的监控功能监控特性不影响性能。功能强大能防SQL注入内置Loging能诊断Hack应用行为。现在已经SpringBoot3Druid的配置也需要随着更新。 SpringBoot3整合Druid 在SpringBoot3中整合Druid连接池可以通过以下步骤进行配置 添加依赖在项目的pom.xml文件中添加Druid的Spring Boot Starter依赖。 druid.version1.2.23/druid.version!-- https://mvnrepository.com/artifact/com.alibaba/druid-spring-boot-3-starter -- dependencygroupIdcom.alibaba/groupIdartifactIddruid-spring-boot-3-starter/artifactIdversion${druid.version}/version /dependency 同时确保已经添加了数据库驱动的依赖例如MySQL !--dependencygroupIdmysql/groupIdartifactIdmysql-connector-java/artifactIdversion${mysql.version}/version /dependency-- dependencygroupIdorg.postgresql/groupIdartifactIdpostgresql/artifactIdversion${postgresql.version}/version /dependency 配置YAML在application.yml中配置数据源和Druid连接池的参数。 spring:datasource:type: com.alibaba.druid.pool.DruidDataSourcedriver-class-name: com.mysql.cj.jdbc.Driverurl: jdbc:mysql://localhost:3306/test?characterEncodingutf8serverTimezoneAsia/Shanghaiusername: rootpassword: root123druid:initial-size: 5min-idle: 5max-active: 20max-wait: 60000time-between-eviction-runs-millis: 60000min-evictable-idle-time-millis: 30000validation-query: select xtest-while-idle: truetest-on-borrow: falsetest-on-return: falsepool-prepared-statements: falsefilters: stat,wall,slf4jmax-pool-prepared-statement-per-connection-size: -1use-global-data-source-stat: trueconnect-properties: druid.stat.mergeSqltrue;druid.stat.slowSqlMillis5000web-stat-filter:enabled: trueurl-pattern: /*exclusions: /druid/*,*.js,*.gif,*.jpg,*.png,*.css,*.icostat-view-servlet:enabled: trueurl-pattern: /druid/*reset-enable: falselogin-username: druidlogin-password: druidallow: 127.0.0.1deny: 启动项目启动Spring Boot应用后Druid连接池将自动配置并可以使用。你可以通过访问Druid提供的监控页面来查看数据库连接池的状态。监控页面的访问地址通常是http://localhost:8080/druid/login.html输入配置的用户名和密码即可登录。 以上步骤是基本方法仅供具体配置可能会根据Druid版本和Spring Boot版本的不同有所变化。在实际操作时建议参考Druid的官方文档和Spring Boot的官方文档进行配置。 Druid监控 http://localhost:12666/api/system/druid/login.html http://localhost:12666/api/system/druid/index.html Github参考代码 当然你也可以参考SpringBoot3脚手架之MySpringBootAPI部分下载即可开始使用DRUID已配置。https://github.com/moshowgame/MySpringBootAPIhttps://github.com/moshowgame/MySpringBootAPI filterslog4j ClassNotFoundException: org.apache.log4j.Priority issue  可以改为 filters: stat,wall,slf4j 或者干脆不要log4j和slf4j Error starting ApplicationContext. To display the condition evaluation report re-run your application with debug enabled. 2024-09-29T19:24:22.89208:00 ERROR 9648 --- [MySpringBootAPI] [ main] o.s.b.d.LoggingFailureAnalysisReporter : *************************** APPLICATION FAILED TO START ***************************Description:Failed to bind properties under spring.datasource.druid to com.alibaba.druid.spring.boot3.autoconfigure.DruidDataSourceWrapper:Property: spring.datasource.druid.filtersValue: stat,wall,log4jOrigin: class path resource [application-dev.yml] - 52:18Reason: java.lang.ClassNotFoundException: org.apache.log4j.PriorityAction:Update your applications configurationProcess finished with exit code 1 Application 完整YAML参考 server:port: 12666servlet:context-path: /apiundertow:threads:io: 4worker: 20url-charset: UTF-8 spring:banner:charset: UTF-8application:name: MySpringBootAPIfreemarker:request-context-attribute: requestsuffix: .htmlcontent-type: text/htmlenabled: truecache: falsecharset: UTF-8allow-request-override: falseexpose-request-attributes: trueexpose-session-attributes: trueexpose-spring-macro-helpers: truetemplate-loader-path: classpath:/templates/settings:number_format: 0.##mvc:static-path-pattern: /static/**servlet:multipart:max-file-size: 10MBmax-request-size: 10MBdatasource:type: com.alibaba.druid.pool.DruidDataSourcedriverClassName: org.postgresql.Driverurl: jdbc:postgresql://127.0.0.1:5432/test?useUnicodetruecharacterEncodingutf-8useSSLfalseserverTimezoneAsia/Shanghaiusername: postgrespassword: root123druid:initialSize: 5minIdle: 5maxActive: 20maxWait: 60000timeBetweenEvictionRunsMillis: 60000minEvictableIdleTimeMillis: 300000validationQuery: SELECT 1testWhileIdle: truetestOnBorrow: falsetestOnReturn: falsefilters: stat,wall,slf4j# 通过connectProperties属性来打开mergeSql功能慢SQL记录connectionProperties: druid.stat.mergeSql\true;druid.stat.slowSqlMillis\5000# 配置DruidStatFilterweb-stat-filter:enabled: trueurl-pattern: /*exclusions: *.js,*.gif,*.jpg,*.bmp,*.png,*.css,*.ico,/druid/*,/system/druid/*# 配置DruidStatViewServletstat-view-servlet:enabled: trueurl-pattern: /system/druid/*# IP白名单(没有配置或者为空则允许所有访问)allow: localhost,127.0.0.1,192.168.*# IP黑名单 (存在共同时deny优先于allow)deny: 10.1.*# 禁用HTML页面上的“Reset All”功能reset-enable: false# 登录名login-username: admin# 登录密码login-password: 123456
http://www.hkea.cn/news/14306476/

相关文章:

  • 网站建设开票税收分类58同城建设网站
  • 手机网站与appwordpress主题模块分享网
  • 芜湖网站公司模板做图 网站
  • 中国工程建设企业协会网站网页设计与制作课程的学情
  • 制作网站的方法有哪些网站运营商查询
  • 企业网站倾向于wordpress职业教育培训网站
  • 河南省住房和城乡建设厅网站wordpress如何置顶
  • 江门专业网站建设公司山东关键词优化推广
  • 淄博建站哪家好门户网站开发一般多少钱
  • 设计配色的网站网站排名怎么做 site
  • 哪个网站做超链接什么网站可以做国外生意
  • 网站关键词标题怎么写山东省建设工程电子信息网站
  • 2015年做哪些网站致富dz转wordpress
  • spark怎么做网站数据库如何建设网站兴田德润怎么样
  • 长沙推广型网站建设dw网页设计制作网站的成品
  • ps做网站边框郑州做旅游网站的公司
  • 博客网站需要的功能注册公司网页
  • 公司做网站设计的深圳交易服务中心官网
  • 免费域名模板建站网站建设设计
  • 网站的seo如何设计学校网站信息化建设工作心得
  • 网站建设相关的网站成品网站软件
  • 宜春网站建设公司微信开放平台怎么解除绑定
  • 工作室网站域名装饰工程包括哪些项目
  • 网站运营方案模板wordpress盈利博客
  • 高级营销型网站建设开发公司绩效考核评分细则
  • codeigniter 手机网站开发国土资源网站建设方案
  • 建立网站多少钱百度关键词搜索次数
  • 张家港安监站网址黑帽seo优化软件
  • 网站建设移动网络公司4001688688人工服务
  • 行情软件app网站大全下载常州网站建设公司哪个好