@Before
  public void init() {

    petite = new PetiteContainer();

    // load parameters
    Props appProps = new Props();
    PropsUtil.loadFromClasspath(appProps, "/props.props");
    petite.defineParameters(appProps);

    // add appCore to Petite (and resolve parameters)
    AutomagicPetiteConfigurator pcfg = new AutomagicPetiteConfigurator();
    pcfg.setIncludedEntries(this.getClass().getPackage().getName() + ".*");
    pcfg.configure(petite);
  }
Beispiel #2
0
 /**
  * Configures Petite container. By default scans the class path for petite beans and registers
  * them automagically.
  */
 protected void registerPetiteContainerBeans(PetiteContainer petiteContainer) {
   AutomagicPetiteConfigurator pcfg = new AutomagicPetiteConfigurator();
   appScanner.configure(pcfg);
   pcfg.configure(petiteContainer);
 }