How to change the setting value of Springboot Hikari CP

Overview

When using SpringBoot, tuning around the DB is required, A note about the settings made at that time.

HikariCP is used as the default connection pool.

environment

Details

Change the description of application.yml as follows. The contents changed this time are the time until the connection timeout and the change of the pool size.

spring.datasource.hikari The following part is the target part.




#### **`application.yml`**
```yaml

spring:
  datasource:
    url:[DB connection destination URL]
    username:[DB connection schema]
    password:[DB connection password]
    driverClassName: oracle.jdbc.OracleDriver
    testOnBorrow: true
    validationQuery: SELECT 1 FROM DUAL
    type: com.zaxxer.hikari.HikariDataSource
    hikari:
      connection-timeout: 60000                  # Default: 30000 (30 seconds)
      connection-test-query: SELECT 1 FROM DUAL
      minimum-idle: 50                           # Default: same as maximumPoolSize
      maximum-pool-size: 500                     # Default: 10

Summary

It came out as soon as I looked it up, but it was something I didn't know.

If you want to make more detailed settings, the information linked below will be helpful.  https://github.com/tokuhirom/java-handbook/blob/master/spring/hikaricp.md

Recommended Posts

How to change the setting value of Springboot Hikari CP
How to change the value of a variable at a breakpoint in intelliJ
[Java] How to get the maximum value of HashMap
[Rails] How to change the column name of the table
[Android] How to get the setting language of the terminal
How to change the contents of the jar file without decompressing
[Swift] How to dynamically change the height of the toolbar on the keyboard
How to display 0 on the left side of the standard input value
[Rails] How to change the page title of the browser for each page
[chown] How to change the owner of a file or directory
I want to change the value of Attribute in Selenium of Ruby
How to increment the value of Map in one line in Java
How to determine the number of parallels
How to change the timezone on Ubuntu
Ransack sort_link How to change the color!
How to sort the List of SelectItem
How to pass the value to another screen
How to output the sum of any three numbers, excluding the same value
How to change the maximum and maximum number of POST data in Spark
How to get the setting value (property value) from the database in Spring Framework
Android development, how to check null in the value of JSON object
[swift5] How to change the color of TabBar or the color of item of TabBar with code
How to find the cause of the Ruby error
Customize how to divide the contents of Recyclerview
How to get today's day of the week
Change the timezone of the https-portal container to JST
Output of how to use the slice method
How Microservices Change the Way of Developing Applications
How to display the result of form input
http: // localhost: How to change the port number
[Java] How to get the authority of the folder
[Swift] How to change the order of Bar Items in Tab Bar Controller [Beginner]
Setting value of log4jdbc.properties
[Java] How to get the URL of the transition source
How to change the action with multiple submit buttons
How to write Scala from the perspective of Java
[Ruby] How to find the sum of each digit
[Ruby on Rails] How to change the column name
[SwiftUI] How to specify the abbreviated position of Text
[Rails] How to get the contents of strong parameters
How to judge the click of any area of the image
How to download the old version of Apache Tomcat
[Swift] How to get the document ID of Firebase
How is the next value of the Time object correct?
How to find the total value, average value, etc. of a two-dimensional array (multidimensional array)-java
[ruby] How to assign a value to a hash by referring to the value and key of another hash
How to display the select field of time_select every 30 minutes
9 Corresponds to the return value
How to dynamically change the column name acquired by MyBatis
I want to change the log output settings of UtilLoggingJdbcLogger
How to specify an array in the return value / argument of the method in the CORBA IDL file
In SpringBoot 2.3.0 or later, the placeholder used for the value of @PropertySource fails to be resolved.
How to get the longest information from Twitter as of 12/12/2016
Git How to easily return to the state before the change (before commit)
I was addicted to the setting of laradock + VSCode + xdebug
[Ruby] How to retrieve the contents of a double hash
How to add elements without specifying the length of the array
Let's summarize how to extend the expiration date of Rails
How to solve the problems of Java's three Blocking Queues
[Rails] How to display the list of posts by category
How to mock some methods of the class under test