Spring Boot 1.3.5 with Hikari Connection Pool not

2019-07-16 07:28发布

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条回答
时光不老,我们不散
2楼-- · 2019-07-16 07:49

Following works in Spring Boot 1.5.8.RELEASE using application.yml file:

spring:
  datasource:
    hikari:
      data-source-properties:
         v$session.program: AppName
查看更多
登录 后发表回答