问题
I have a JHipster spring boot ver 1.3.5 application which connects to Oracle DB using Hikari Connection Pool. I am unable to set the program in v$session
which should be possible by adding below in my application YAML
hikari:
v$session:
program: AppName
username: DB_USER
I have tried adding these at spring.datasource level, datasource.hikari level and datasource level.
I also looked at Hibernate 4.3.5 ignores v$session.program configuration property but that did not work as well.
Update 1 - I tried all the below and none seem to work
spring.datasource.hikari.datasourceProperties.v$session.program AppName
spring.datasource.hikari.datasourceProperties.v$session.username DB_USER
datasource.hikari.v$session.program AppName
datasource.hikari.v$session.username DB_USER
datasource.hikari.datasourceProperties.v$session.program AppName
datasource.hikari.datasourceProperties.v$session.username DB_USER
hikari.v$session.program AppName
hikari.v$session.username DB_USER
hikari.datasourceProperties.v$session.program AppName
hikari.datasourceProperties.v$session.username DB_USER
回答1:
Following works in Spring Boot 1.5.8.RELEASE using application.yml
file:
spring:
datasource:
hikari:
data-source-properties:
v$session.program: AppName
来源:https://stackoverflow.com/questions/41129486/spring-boot-1-3-5-with-hikari-connection-pool-not-able-to-set-program-name-in-v