SpringSource 工具套件中的重构会产生无法工作的代码
如果我在 STS 中使用 Refactor->Rename 重命名类,类引用会自动更新(就像在普通的 Eclipse Java 项目中一样),但在特殊的 Spring 文件(如 XML 配置文件,例如 >root-context.xml
),它指定依赖注入之类的东西。这会导致代码无法工作。
有人知道这个问题应该如何处理吗?
If I rename classes with Refactor->Rename in STS, class references are automatically updated (like in a normal Eclipse Java project), but not in special Spring files like the XML configuration files (e.g. root-context.xml
) which specify things like dependency injections. This results in non-working code.
Anybody knows how this problem is supposed to be handled?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
启用选项“更新非 Java 文本文件中的完全限定名称”。
这是“重命名类型”对话框中的一个选项。
如果您按重构名称(Alt-Shift+R)两次,就会发生这种情况!
Enable the option "Update fully qualified names in non-Java text files."
This is an option in the "Rename Type" dialog.
It occures if you press refactor name (Alt-Shift+R) TWICE!