* @see #setAttachments
*/
public void postProcessBeanFactory(
ConfigurableListableBeanFactory beanFactory) throws BeansException {
ListableBeanFactory source = this.applicationContext == null ? beanFactory
: this.applicationContext;
attachAllResources(source);
attachAllRestlets(source);
if (getAttachments() != null) {
for (Map.Entry<String, String> attachment : getAttachments()
.entrySet()) {
String uri = attachment.getKey();
String beanName = attachment.getValue();
Class<?> beanType = source.getType(beanName);
if (org.restlet.resource.ServerResource.class
.isAssignableFrom(beanType)) {
attachResource(uri, beanName, source);
} else if (Restlet.class.isAssignableFrom(beanType)) {