Does anyone use the spring framework of Java config now?

I am browsing the spring Java config page

It says

Does that mean it's out of date? Does anyone use it in their projects now? Does it have any advantages over traditional XML configuration?

Solution

Although the spring Java config project has been stopped (the web page remains unchanged just to keep the link active), since spring 3, the results of the project have been folded into the spring main project Therefore, you should not use Java config project annotations to get new code, but standard @ bean and @ configuration (and @ value, etc.) annotations

As long as you use spring 3, you can use @ configuration and @ value in the same project as the XML configuration When I do this, it applies to complex configuration problems (I mainly prefer to use XML configuration because it provides better support in the springsource tool suite, but when you need to get the name of the class to instantiate beans from properties - Hey, it's tricky! – then XML configuration won't cut it.)

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>