Java EE 6 offers (at least) two dependency injection mechanisms: DI annotations from Java EE 5, such as @EJB, @PersistenceContext, @Resource ... and the new JSR 330. Can I replace the "old" DI annotations with more general JSR 330 annotations?
Are there any advantages or disadvantages of this or that approach? Which one would you use and why?
Go to the JSR 330 annotations. They will work with other DI environments that are being updated, such as Spring 3.0.
, JSR330 . , JSR-330 , .
, beans, guice spring . spring beans , , , spring , JSR-330.
Source: https://habr.com/ru/post/1726798/More articles:kernel stack and user-mode application stack - language-agnosticASP.NET with Javascript disabled - javascriptASP.NET URL Redirection - asp.netDynamicMethod for ConstructorInfo.Invoke, what do I need to consider? - c #Where to download jdk 1.4.2 for Windows - javaWhere can I find the source code for the Redhat nash utility? - redhatLoading a Java class with native code dependency - javaDoes jqGrid multiselect only give ids when the top checkbox is checked? - jqueryjava, System.loadlibrary ("someDLLFile") gets an unsatisfied link error - javacreating django admin as an action for third-party users without an administrator - how - djangoAll Articles