If you have a library containing Spring beans that needs to be linked together before the application can use them, does it make sense to include any bean configuration file (for example, the META-INF directory) in the JAR? The idea is to give the application the ability to import this into its Spring wizard context configuration.
There may be several ways to connect these beans, so I can provide a bean configuration file for each of the standard ways that you usually bundle them together.
Or can I get the application to directly connect them?
If this helps, the features of my problem are related to the library I created to encapsulate the product preservation layer. It contains Service, DAO and beans model. DAO implementations currently use Hibernate (this probably won't change). Some DAO implementations require different types of beans strategies into which they are embedded (database encryption logic), depending on the type of database we are deploying (MySQL vs SQL Server, etc.). Therefore, we have potentially several different configuration scenarios. I could also provide a datasource bean configuration, relying on application-level property substitution to enter all the data needed for the data source.
Thanks for your input!
source share