data_source.properties__ 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. # base spring data source configuration
  2. spring.datasource.type=com.alibaba.druid.pool.DruidDataSource
  3. spring.datasource.driver-class-name=com.mysql.jdbc.Driver
  4. spring.datasource.url=jdbc:mysql://192.168.220.188:3306/dolphinscheduler?characterEncoding=UTF-8
  5. spring.datasource.username=root
  6. spring.datasource.password=root@123
  7. # connection configuration
  8. spring.datasource.initialSize=5
  9. # min connection number
  10. spring.datasource.minIdle=5
  11. # max connection number
  12. spring.datasource.maxActive=50
  13. # max wait time for get a connection in milliseconds. if configuring maxWait, fair locks are enabled by default and concurrency efficiency decreases.
  14. # If necessary, unfair locks can be used by configuring the useUnfairLock attribute to true.
  15. spring.datasource.maxWait=60000
  16. # milliseconds for check to close free connections
  17. spring.datasource.timeBetweenEvictionRunsMillis=60000
  18. # the Destroy thread detects the connection interval and closes the physical connection in milliseconds if the connection idle time is greater than or equal to minEvictableIdleTimeMillis.
  19. spring.datasource.timeBetweenConnectErrorMillis=60000
  20. # the longest time a connection remains idle without being evicted, in milliseconds
  21. spring.datasource.minEvictableIdleTimeMillis=300000
  22. #the SQL used to check whether the connection is valid requires a query statement. If validation Query is null, testOnBorrow, testOnReturn, and testWhileIdle will not work.
  23. spring.datasource.validationQuery=SELECT 1
  24. #check whether the connection is valid for timeout, in seconds
  25. spring.datasource.validationQueryTimeout=3
  26. # when applying for a connection, if it is detected that the connection is idle longer than time Between Eviction Runs Millis,
  27. # validation Query is performed to check whether the connection is valid
  28. spring.datasource.testWhileIdle=true
  29. #execute validation to check if the connection is valid when applying for a connection
  30. spring.datasource.testOnBorrow=true
  31. #execute validation to check if the connection is valid when the connection is returned
  32. spring.datasource.testOnReturn=false
  33. spring.datasource.defaultAutoCommit=true
  34. spring.datasource.keepAlive=true
  35. # open PSCache, specify count PSCache for every connection
  36. spring.datasource.poolPreparedStatements=true
  37. spring.datasource.maxPoolPreparedStatementPerConnectionSize=20
  38. # data quality analysis is not currently in use. please ignore the following configuration
  39. # task record flag
  40. task.record.flag=false
  41. task.record.datasource.url=jdbc:mysql://192.168.xx.xx:3306/etl?characterEncoding=UTF-8
  42. task.record.datasource.username=xx
  43. task.record.datasource.password=xx