I have a dataSource
bean. I need to extract a boolean value from it:
dataSource.getConnection().getMetaData().supportsStoredProcedures()
and then use it inside my DAO to define behavior.
The obvious way to get this value is to inject dataSource
directly to my DAO class (currently it uses only EntityManager).
But I'm curious is there a way to get only boolean flag value?
Can we use spring expression language inside @Value
annotation to calculate the flag?
Or is there any other alternative?