Package org.springframework.beans.factory.generic

Examples of org.springframework.beans.factory.generic.GenericBeanFactoryAccessor


  }

  public void testIsProxy() throws Exception {
    TransactionalTestBean bean = getTestBean();
    assertTrue("testBean is not a proxy", AopUtils.isAopProxy(bean));
    Map services = new GenericBeanFactoryAccessor(this.context).getBeansWithAnnotation(Service.class);
    assertTrue("Stereotype annotation not visible", services.containsKey("testBean"));
  }
View Full Code Here


    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) {
View Full Code Here

  protected String[] determineUrlsForHandler(String beanName) {
    ApplicationContext context = getApplicationContext();
    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) {
      // @RequestMapping found at type level
      this.cachedMappings.put(handlerType, mapping);
      Set<String> urls = new LinkedHashSet<String>();
View Full Code Here

TOP

Related Classes of org.springframework.beans.factory.generic.GenericBeanFactoryAccessor

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.