The following tests demonstrate how, in Spring, you can configure your beans explicitly using Java. I wasn't sure if the internal method calls would result in two instantiations of the dependency or not. Clearly, it works as expected, i.e. only one instance is created because the default mode for instantiating beans is singleton scope. The magic is called cglib.
Sunday, April 11, 2010
Using Spring Java Config to wire up Dependencies
Labels:
java,
javaconfig,
software development,
spring
Subscribe to:
Post Comments (Atom)





0 comments:
Post a Comment