Support #7

Document the two configuration strategies

Added by Kaare Nilsen 268 days ago. Updated 103 days ago.

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.

Add

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

09/16/2008 02:45 PM - Kaare Nilsen

  • Target version changed from 2 to 1.1

09/26/2008 12:03 PM - Kaare Nilsen

  • % Done changed from 0 to 100

09/26/2008 12:07 PM - Kaare Nilsen

  • Status changed from New to Resolved

09/26/2008 12:08 PM - Kaare Nilsen

  • Status changed from Resolved to Closed

Also available in: Atom PDF