1 16 17 package org.springframework.beans.factory; 18 19 24 public class MustBeInitialized implements InitializingBean { 25 26 private boolean inited; 27 28 31 public void afterPropertiesSet() throws Exception { 32 this.inited = true; 33 } 34 35 39 public void businessMethod() { 40 if (!this.inited) 41 throw new RuntimeException ("Factory didn't call afterPropertiesSet() on MustBeInitialized object"); 42 } 43 44 } 45 | Popular Tags |