if (useBeanAccessor) {
ec.addPropertyAccessor(new BeanFactoryAccessor());
ec.setRootObject(applicationContext);
}
if (useBeanResolver) {
ec.setBeanResolver(new BeanFactoryResolver(applicationContext));
}
if (defaultRootObject != null) {
ec.setRootObject(defaultRootObject);
if (!useMapAccessor && defaultRootObject instanceof Map)
ec.addPropertyAccessor(new MapAccessor());