从 Spring 3 注释生成完整的 XML 配置 [英] Generate full XML configuration from Spring 3 annotations

查看:26
本文介绍了从 Spring 3 注释生成完整的 XML 配置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有办法根据散布在各个类中的 Spring 3 注释生成完整的 XML 配置文件?

Is there is a way to generate full XML configuration file based on Spring 3 annotations scattered all over the classes?

理想情况下,我正在寻找一种可以解析"Spring 3 项目并输出 XML 配置的工具,例如 就像 xdoclet 所做的(但与 Spring 注释不同)

Ideally, I'm looking for a tool that can "parse" a Spring 3 project and output XML configuration, something like xdoclet was doing (but off course from Spring annotations)

是否有这样的工具,或者如果不存在我可以编写自己的工具?

Is there a tool like this, or a way I could write my own if none exists?

推荐答案

您始终可以编写自己的.我不知道一个.

You can always write your own. I'm not aware of one.

有趣,因为有些人抱怨XML配置繁重,所以添加了注释.你在这里逆流而上.

Funny, because annotations were added because some people complained about heavy XML configuration. You're swimming against the tide here.

只是好奇 - 为什么你现在想要 XML?为什么注释不够?

Just curious - why do you want the XML now? Why aren't the annotations sufficient?

这篇关于从 Spring 3 注释生成完整的 XML 配置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆