I want to set db2 encryption password command when spring boot starts a connection with my db2. Basically some of the columns in my table are encrypted. I tried hibernate mapper @ColumnTransformer(read="decrypt_char(COLUMN_NAME,'password')",write="encrypt(?,'password')").
That does not work. After some look around I found that I have to set the encryption password with the following command when the database connection is established from spring boot application properties file.
SET ENCRYPTION PASSWORD ='password'(This is DB2 specific)
I dont see any way of setting this in spring boot. I believe there must be a property defined in application.properties which would set this. Currently I am just passing db2 connection as per following
spring.datasource.url=url
spring.datasource.username=username
spring.datasource.password=password
spring.datasource.driver-class-name=om.ibm.db2.jcc.DB2Driver
Any help is appreciated.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…