Support #7
Document the two configuration strategies
| Status : | Closed | Start : | 04/13/2008 | |
| Priority : | Normal | Due date : | ||
| Assigned to : | Kaare Nilsen | % Done : | 100% |
|
| Category : | Documentation | Spent time : | - | |
| Target version : | 1.1 | Estimated time : | 0.00 hours | |
Description
- Self-configuring beans
- Example on how to wrap e.g. a BasicDatasource? to make this a self-configuring bean.
- Configuration with placeholders directly in the application context.
Related issues
History
04/13/2008 11:18 PM - Kaare Nilsen
I have done a bean that I consider best practice at my current project. and it looks sort a like this
public class MyBean {
@Autowired StageAwareProperties properties;
private String myValue;
@PostConstruct
public void initBean(){
if (null == myValue){
myValue = properties.getProperty("myKey","default value");
}
}
public void setMyValue(String newValue){
myValue = newValue;
}
05/30/2008 11:42 AM - Kaare Nilsen
- Estimated time set to 0.0
- Target version changed from 1.0-beta-1 to 2