| Author |
@PostConstruct
|
Marcos Vidolin
Greenhorn
Joined: May 10, 2011
Posts: 25
|
|
Hello all,
May I use an @Autowired object from Spring inside my @PostConstruct method?
Tks
[]'s
|
 |
Tim Holloway
Saloon Keeper
Joined: Jun 25, 2001
Posts: 14491
|
|
I think that Autowired is used by Spring to construct beans and (no surprise here!) automatically wire them together.
A JSF backing bean, however, is constructed by JSF, not by Spring. The JSF equivalent of @Autowired is @ManagedProperty.
The main functional difference between the 2 annotations is that @ManagedProperty accepts an EL expression instead of simply deducing the source property's bean name.
|
Customer surveys are for companies who didn't pay proper attention to begin with.
|
 |
 |
|
|
subject: @PostConstruct
|
|
|