0
点赞
收藏
分享

微信扫一扫

Spring property 设置属性的属性

yundejia 2023-06-30 阅读 48

<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;
  } 
 }

举报

相关推荐

0 条评论