use of com.opensymphony.xwork2.config.entities.PackageConfig.Builder in project struts by apache.
the class DefaultPropertiesProvider method register.
public void register(ContainerBuilder builder, LocatableProperties props) throws ConfigurationException {
try {
PropertiesSettings defaultSettings = new PropertiesSettings("org/apache/struts2/default");
loadSettings(props, defaultSettings);
} catch (Exception e) {
throw new ConfigurationException("Could not find or error in org/apache/struts2/default.properties", e);
}
}
use of com.opensymphony.xwork2.config.entities.PackageConfig.Builder in project onebusaway-application-modules by camsys.
the class SpringContainer method register.
@Override
public void register(ContainerBuilder builder, LocatableProperties props) throws ConfigurationException {
// Since we're about to override...
builder.setAllowDuplicates(true);
builder.factory(ObjectFactory.class, new Factory<ObjectFactory>() {
public ObjectFactory create(Context xworkContext) throws Exception {
SpringObjectFactory f = new SpringObjectFactory();
xworkContext.getContainer().inject(f);
f.setApplicationContext(_applicationContext);
f.setAutowireStrategy(_autoWireStrategy);
return f;
}
@Override
public Class<? extends ObjectFactory> type() {
return ObjectFactory.class;
}
});
}
Aggregations