Are there any considerations when using Spring bean IDs that contain spaces?

依然范特西╮ 提交于 2019-12-11 08:07:17

问题


Most examples of Spring bean IDs use Java-style variable names, such as someBean. However, that style isn't enforced; in fact, spaces and some other special characters are permitted (as of Spring 3.1 and later). An argument can be made for using more verbose bean IDs, such as:

<bean id="Some Bean" />

So far I've encountered only one issue with using bean IDs like that (see How can I declare a Spring `depends-on` attribute with a bean ID that contains spaces?). Are there any other important ramifications or limitations to consider when choosing bean names with spaces?

来源:https://stackoverflow.com/questions/29125788/are-there-any-considerations-when-using-spring-bean-ids-that-contain-spaces

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!