@Bean @ConditionalOnMissingBean(BeanNameViewResolver.class) public BeanNameViewResolver beanNameViewResolver() { BeanNameViewResolver resolver = new BeanNameViewResolver(); resolver.setOrder(Ordered.LOWEST_PRECEDENCE - 10); return resolver; }
@Bean @ConditionalOnBean(View.class) @ConditionalOnMissingBean public BeanNameViewResolver beanNameViewResolver() { BeanNameViewResolver resolver = new BeanNameViewResolver(); resolver.setOrder(Ordered.LOWEST_PRECEDENCE - 10); return resolver; }
@Bean @ConditionalOnMissingBean @ConditionalOnProperty(prefix = "spring.social", name = "auto-connection-views") public BeanNameViewResolver beanNameViewResolver() { BeanNameViewResolver viewResolver = new BeanNameViewResolver(); viewResolver.setOrder(Ordered.HIGHEST_PRECEDENCE); return viewResolver; }
@Bean @ConditionalOnBean(View.class) public BeanNameViewResolver beanNameViewResolver() { BeanNameViewResolver resolver = new BeanNameViewResolver(); resolver.setOrder(Ordered.LOWEST_PRECEDENCE - 10); return resolver; }
@Bean @ConditionalOnMissingBean @ConditionalOnProperty(prefix = "spring.social", name = "auto-connection-views") public BeanNameViewResolver beanNameViewResolver() { BeanNameViewResolver viewResolver = new BeanNameViewResolver(); viewResolver.setOrder(Integer.MIN_VALUE); return viewResolver; }
/** * Register a bean name view resolver that interprets view names as the names * of {@link org.springframework.web.servlet.View} beans. */ public void beanName() { BeanNameViewResolver resolver = new BeanNameViewResolver(); this.viewResolvers.add(resolver); }
@Test public void beanName() { this.registry.beanName(); assertEquals(1, this.registry.getViewResolvers().size()); assertEquals(BeanNameViewResolver.class, registry.getViewResolvers().get(0).getClass()); }
@Bean public ViewResolver beanNameViewResolver() { return new BeanNameViewResolver(); }
@Bean public org.springframework.web.servlet.ViewResolver viewResolver() { return new BeanNameViewResolver(); }
@Bean @Description("Used for 'xml' views") public ViewResolver beanNameViewResolver() { return new BeanNameViewResolver(); }
@Bean public BeanNameViewResolver beanNameResolver(){ BeanNameViewResolver br = new BeanNameViewResolver() ; return br; }
@Bean public BeanNameViewResolver beanNameViewResolver() { BeanNameViewResolver bnvr = new BeanNameViewResolver(); bnvr.setOrder(1); return bnvr; }
@Bean public BeanNameViewResolver beanNameViewResolver() { BeanNameViewResolver viewResolver = new BeanNameViewResolver(); viewResolver.setOrder(1); return viewResolver; }
/** * Bean name view resolver view resolver. * * @return the view resolver */ @Bean public ViewResolver beanNameViewResolver() { return new BeanNameViewResolver(); }