<p>In spring you can initialize a bean by having the applicationContext.xml invoke a constructor, or you can set properties on the bean.  What are the trade offs between the two approaches?  Is it better to have a constructor (which enforces the contract of having everything it needs in one method) or is it better to have all properties (which gives you flexibility to only inject selectively for example when unit testing.)</p>

<p>What are the trade offs (between writing a bean that uses a constructor to establish it's initial state, or using properties and perhaps an afterProperties() method) ?</p>

IMO the major advantage of constructor injection is that it is compatible with immutability. However, if a class has more than about 3 dependencies, this requires providing a constructor which takes a large number of parameters, which is unwieldy.
When using setter-injection, I prefer to use the
```
@PostConstruct
```
annotation to identify the initialization method. This involves looser coupling to the Spring framework than the
```
afterProperties()
```
method you mention (actually, I think it's
```
afterPropertiesSet()
```
). Another option is the init method attribute of the
```
<bean>
```
element.