micronaut-sql icon indicating copy to clipboard operation
micronaut-sql copied to clipboard

feat: Add Global Datasource configuration application for data-source-properties

Open jamesforwardnwboxed opened this issue 5 months ago • 3 comments

Right now this PR allows globally setting values in data-source-properties, via global.datasources.data-source-properties. We find this to be extremely helpful when enforcing organisational standards - for example, providing helm charts which provide these values out of the box which force connection pinning on PostgreSQL via assumeMinServerVersion and forcing the ApplicationName to match the provisioned microservice.

Naturally we could improve this in future to also allow global configuration of other properties rather than just the data-source-properties map, but this is a nice start

jamesforwardnwboxed avatar Jul 29 '25 10:07 jamesforwardnwboxed

CLA assistant check
All committers have signed the CLA.

CLAassistant avatar Jul 29 '25 10:07 CLAassistant

Hi @graemerocher , I was wondering if it would be possible to get this merged in at some point? not sure who else to ping to get a review

jamesforwardnwboxed avatar Aug 11 '25 09:08 jamesforwardnwboxed

Instead of the listener you should inject the global conf and apply the settings in the post construct method.

dstepanov avatar Aug 12 '25 11:08 dstepanov