How can I use the simple class name in Spring beans?

前端 未结 1 1545
陌清茗
陌清茗 2021-01-07 09:37

How can I use


    
<         


        
相关标签:
1条回答
  • 2021-01-07 10:25

    It appears that you cannot use the simple class name instead of the fully qualified class name, as this Stack Overflow article discusses (and q.v. the Spring documentation itself), unless your bean oneId serves only as a parent for child beans.

    However, if you use annotations instead of the XML descriptor files, you can use the simple class name OneClass and allow the import statement to handle the messiness of the package name qualifier.

    0 讨论(0)
提交回复
热议问题