A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
using spring to develop java library, needed best practise for configuration?
Joined: Sep 27, 2006
Sep 02, 2009 00:20:09
I am using spring to develop a
library which will be plugged in to our other projects.
So, there is some dependency (even after annotations used) which will go in an XML file.
Now, I can load this xml from inside packaged jar, But it would be different spring context
. Ideally,it should be in the same spring context created by application which uses this JAR.
To be in the same spring context,whoever uses this JAR library file needs to include this XML content in their own spring configuration XML file.
It doesn't seem a best practice to include configuration of JAR file in Application.
Joined: Nov 24, 2005
Sep 02, 2009 02:08:58
If you're using something like
, the context should be the same.
All roads lead to JavaRanch
Joined: Sep 29, 2008
Sep 02, 2009 08:39:56
If you have a default configuration it's fine (IMO); it can always be overridden by the project using your library.
subject: using spring to develop java library, needed best practise for configuration?
Spring application context
How to put configuration files of Spring, JPA and log4j outside jar in standalone app?
JSP MVC JDBC
maven2 building a spring web application
Spring + MVC pattern in non-web application
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2015