Best practice: spring configuration xml and java -


what best way inject beans such can have following:

  • greedy initialization of various objects defined beans
  • be able trace definition of beans in ide
  • keep initialization in xml file, there's no "main" file need define annotationconfigapplicationcontext object.

the implementation i'm seeing in project has above features, isn't docs recommended, , we've seen undefined behavior.

explanation of current implementation have 3-4 java classes @configuration annotation. these classes consist of many @beans. ensures @beans greedily initialized.

we have spring.xml defines @configuration class bean. thus, able trace definition of beans since of calls made using configuration class object, like: config.s3client()

and of course, there's no need bothering annotation objects.

would appreciate thoughts.


Comments

Popular posts from this blog

angular - Ionic slides - dynamically add slides before and after -

minify - Minimizing css files -

Add a dynamic header in angular 2 http provider -