0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

Springboot+gradle+db2

Last updated at Posted at 2021-01-19

db2での設定メモ

ソースはこちら

application.properties
# ===============================
# = DATA SOURCE
# ===============================
# Set here configurations for the database connection
spring.datasource.url=jdbc:db2://[hostname]:[port]/[dbname]
spring.datasource.username=[connect user name]
spring.datasource.password=[connect user pw]
spring.datasource.driver-class-name=com.ibm.db2.jcc.DB2Driver
# Keep the connection alive if idle for a long time (needed in production)
spring.datasource.testWhileIdle=true
spring.datasource.validationQuery=SELECT RAND() AS RANDOM_NUMBER FROM DUAL
build.gradle
dependencies {
        ~
	implementation 'com.ibm.db2.jcc:db2jcc:db2jcc4'
        ~
}
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?