String[] beanNames = context.getBeanNamesForType(Object.class);
for (String beanName : beanNames) {
Class<?> handlerType = context.getType(beanName);
ListableBeanFactory bf = (context instanceof ConfigurableApplicationContext ?
((ConfigurableApplicationContext) context).getBeanFactory() : context);
GenericBeanFactoryAccessor bfa = new GenericBeanFactoryAccessor(bf);
RequestMapping mapping = bfa.findAnnotationOnBean(beanName, RequestMapping.class);
if (mapping != null) {
String[] modeKeys = mapping.value();
String[] params = mapping.params();
boolean registerHandlerType = true;
if (modeKeys.length == 0 || params.length == 0) {