This link has been bookmarked by 3 people . It was first bookmarked on 15 Aug 2007, by Colin Wong.
-
15 Aug 07
-
<!-- OAS ad tag end -->
<!-- ---- OAS AD '120x60-1' end ---- -->
This code creates a Person object and calls the setEmail() method, passing in the string defined as a value.It is good practice to default your classes to being immutable until you have a reason to make them mutable. Constructor-based injection will allow you to take advantage of dependency-injection while still permitting immutability. If your classes are meant to be immutable, then it is probably best to stick with constructor-based injection.
-
This feature is meant to save you from having to explicitly type out the names of the beans that you reference. I personally favor explicitness in order to make the bean definitions more readable, thus I choose not to use Spring's autowiring functionality, but you may find it useful.
-
The Spring documentation recommends always using ApplicationContext unless you have memory usage restrictions,
-
One major advantage to ApplicationContext is that it can be loaded declaratively within the context of an application server
-
ApplicationContext is actually an interface in Spring. WebApplicationContext is a class that implements ApplicationContext and can be used in your Web applications. Here is how you access the ApplicationContext from within your Web application.
-
-
11 Apr 07
-
05 Jun 06
Would you like to comment?
Join Diigo for a free account, or sign in if you are already a member.