datasource.properties.tpl 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. #
  2. # Licensed to the Apache Software Foundation (ASF) under one or more
  3. # contributor license agreements. See the NOTICE file distributed with
  4. # this work for additional information regarding copyright ownership.
  5. # The ASF licenses this file to You under the Apache License, Version 2.0
  6. # (the "License"); you may not use this file except in compliance with
  7. # the License. You may obtain a copy of the License at
  8. #
  9. # http://www.apache.org/licenses/LICENSE-2.0
  10. #
  11. # Unless required by applicable law or agreed to in writing, software
  12. # distributed under the License is distributed on an "AS IS" BASIS,
  13. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  14. # See the License for the specific language governing permissions and
  15. # limitations under the License.
  16. #
  17. # datasource configuration
  18. spring.datasource.driver-class-name=${DATABASE_DRIVER}
  19. spring.datasource.url=jdbc:${DATABASE_TYPE}://${DATABASE_HOST}:${DATABASE_PORT}/${DATABASE_DATABASE}${DATABASE_PARAMS:+?${DATABASE_PARAMS}}
  20. spring.datasource.username=${DATABASE_USERNAME}
  21. spring.datasource.password=${DATABASE_PASSWORD}
  22. # mysql example
  23. #spring.datasource.driver-class-name=com.mysql.jdbc.Driver
  24. #spring.datasource.url=jdbc:mysql://127.0.0.1:3306/dolphinscheduler?useUnicode=true&characterEncoding=UTF-8
  25. #spring.datasource.username=ds_user
  26. #spring.datasource.password=dolphinscheduler
  27. # connection configuration
  28. #spring.datasource.initialSize=5
  29. # min connection number
  30. #spring.datasource.minIdle=5
  31. # max connection number
  32. #spring.datasource.maxActive=50
  33. # max wait time for get a connection in milliseconds. if configuring maxWait, fair locks are enabled by default and concurrency efficiency decreases.
  34. # If necessary, unfair locks can be used by configuring the useUnfairLock attribute to true.
  35. #spring.datasource.maxWait=60000
  36. # milliseconds for check to close free connections
  37. #spring.datasource.timeBetweenEvictionRunsMillis=60000
  38. # 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.
  39. #spring.datasource.timeBetweenConnectErrorMillis=60000
  40. # the longest time a connection remains idle without being evicted, in milliseconds
  41. #spring.datasource.minEvictableIdleTimeMillis=300000
  42. #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.
  43. #spring.datasource.validationQuery=SELECT 1
  44. #check whether the connection is valid for timeout, in seconds
  45. #spring.datasource.validationQueryTimeout=3
  46. # when applying for a connection, if it is detected that the connection is idle longer than time Between Eviction Runs Millis,
  47. # validation Query is performed to check whether the connection is valid
  48. #spring.datasource.testWhileIdle=true
  49. #execute validation to check if the connection is valid when applying for a connection
  50. #spring.datasource.testOnBorrow=true
  51. #execute validation to check if the connection is valid when the connection is returned
  52. #spring.datasource.testOnReturn=false
  53. #spring.datasource.defaultAutoCommit=true
  54. #spring.datasource.keepAlive=true
  55. # open PSCache, specify count PSCache for every connection
  56. #spring.datasource.poolPreparedStatements=true
  57. #spring.datasource.maxPoolPreparedStatementPerConnectionSize=20