View Full Version : XDoclet module anywhere?
bpolka
Aug 13th, 2004, 11:23 AM
I am looking for an XDoclet module to generate spring config file.
Is anyone aware of existing effort? Or is there a reason not to
have one?
pburleson
Aug 13th, 2004, 11:58 AM
I am looking for an XDoclet module to generate spring config file.
Is anyone aware of existing effort? Or is there a reason not to
have one?
You might want to check out
http://xdoclet.sourceforge.net/xdoclet/tags/spring-tags.html
and
http://xdoclet.sourceforge.net/xdoclet/ant/xdoclet/modules/spring/SpringDocletTask.html
Those links give the JavaDoc tags and Ant Task info respectively.
For some reason ithe XDoclet Team hasn't linked them from the main page yet. There is an JIRA issue raised with them to do so.
Patrick
mraible
Aug 13th, 2004, 12:17 PM
These links have been fixed in CVS and will be in the next release.
Matt
bpolka
Aug 13th, 2004, 01:06 PM
thanks, guys!
It is funny I jst checked XDoclet mailing list today and there was exact same questions aaasked :P
Cybernet Sauvignon
Aug 13th, 2004, 03:13 PM
Hello,
as I know, the mentioned xdoclet-spring module allows you mark a bean, which entry will be then generated into the appCtx file.
This is mostly enough. But if you have more implementations of one interface for specific configurations, you can't use it without being always modifying your sources.
This specials must be handled by hand, but on slightly bigger project this is painfull also.
In company which I am working for, we wrote similar (but very simple) xdoclet module, which just marks bean implementations and their consumers, and generates appCtx with autowiring on.
The markup looks like this:
/**
* @myspring.implementation
*/
public class DefaultServiceImpl implements Service {
...
}
/**
* @myspring.implementation config=customer1
*/
public class CustomerServiceImpl implements Service {
...
}
Then we can run our xdoclet task with a set of configuration paramaters.
With no parameters, a config with the default bean is generated.
With "customer1" parameter, config with Customer bean is generated.
As it was written before the last xdoclet version came out, it is very simple and feature less.
Please, don't ask me to give you the code, as it belongs to my employer, and the firm didn't defined its strategy to OSS yet.
But may be ...
CS
vBulletin® v3.7.3, Copyright ©2000-2008, Jelsoft Enterprises Ltd.