alibaba / druid

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

druid-spring-boot-starter目前对springboot2 webflux有支持吗? #3785

Open wuxijie opened 4 years ago

wuxijie commented 4 years ago

druid-spring-boot-starter目前对springboot2 webflux有支持吗?

SnowZhouJ commented 4 years ago

目前webflux下druid是可以用的,只是监控界面访问不了,这个后续应该考虑支持一下webflux的监控界面访问的问题

SnowZhouJ commented 4 years ago

@argan webflux的监控界面访问的问题,有计划解决吗?

zhaoyou commented 3 years ago

@SnowZhouJ 就算不用监控页面 怎么配置可以支持,启动一直报找不到Servlet

Caused by: java.lang.ClassNotFoundException: javax.servlet.Servlet
spring:
  datasource:
    driver-class-name: com.mysql.jdbc.Driver
    url: jdbc:mysql://127.0.0.1:3306/test?useUnicode=true&characterEncoding=UTF-8&useSSL=false
    username: root
    password: password
    type: com.alibaba.druid.pool.DruidDataSource
    druid:
      initial-size: 1
      min-idle: 1
      max-active: 20
      max-wait: 60000
      time-between-eviction-runs-millis: 60000
      min-evictable-idle-time-millis: 300000
      validation-query: SELECT 1 FROM DUAL
      test-while-idle: true
      test-on-borrow: false
      test-on-return: false
      pool-prepared-statements: false
      max-pool-prepared-statement-per-connection-size: 20