Spring property 设置属性的属性

来源:互联网 发布:淘宝更改登录名 编辑:程序博客网 时间:2024/05/17 23:43

<bean id="test" class="test.spring.Test" >
  <property name="trace.type" value="CITITRACE_DEPTH" />
</bean>
 
 
public class Test {
private Field trace = new Field();


public Field getTrace() {
 return trace;
}


public void init() {
 ...
 }
}


public class TypeChainField {
 private String type;
 
 public String getType() {
  return type;
 }
 public void setType(String type) {
  this.type = type;
 } 
}