Here are the examples of the java api org.springframework.core.Ordered.LOWEST_PRECEDENCE taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.
59 Examples
19
View Source File : PropertiesRunListener.java
License : MIT License
Project Creator : zidoshare
License : MIT License
Project Creator : zidoshare
@Override
public int getOrder() {
return Ordered.LOWEST_PRECEDENCE;
}
19
View Source File : DefaultErrorViewResolverTests.java
License : Apache License 2.0
Project Creator : yuanmabiji
License : Apache License 2.0
Project Creator : yuanmabiji
@Test
public void orderShouldBeLowest() {
replacedertThat(this.resolver.getOrder()).isEqualTo(Ordered.LOWEST_PRECEDENCE);
}
19
View Source File : OrderWrapper.java
License : Apache License 2.0
Project Creator : yfh0918
License : Apache License 2.0
Project Creator : yfh0918
public static int resolveOrder(Object object) {
if (!object.getClreplaced().isAnnotationPresent(Order.clreplaced)) {
return Ordered.LOWEST_PRECEDENCE;
} else {
return object.getClreplaced().getAnnotation(Order.clreplaced).value();
}
}
19
View Source File : SpringValueProcessor.java
License : Apache License 2.0
Project Creator : yfh0918
License : Apache License 2.0
Project Creator : yfh0918
@Override
public int getOrder() {
// make it as late as possible
return Ordered.LOWEST_PRECEDENCE;
}
19
View Source File : ViewResolverRegistryTests.java
License : MIT License
Project Creator : Vip-Augus
License : MIT License
Project Creator : Vip-Augus
@Test
public void order() {
replacedertEquals(Ordered.LOWEST_PRECEDENCE, this.registry.getOrder());
}
19
View Source File : AbstractTestExecutionListener.java
License : MIT License
Project Creator : Vip-Augus
License : MIT License
Project Creator : Vip-Augus
/**
* The default implementation returns {@link Ordered#LOWEST_PRECEDENCE},
* thereby ensuring that custom listeners are ordered after default
* listeners supplied by the framework. Can be overridden by subclreplacedes
* as necessary.
* @since 4.1
*/
@Override
public int getOrder() {
return Ordered.LOWEST_PRECEDENCE;
}
19
View Source File : EnableAsyncTests.java
License : MIT License
Project Creator : Vip-Augus
License : MIT License
Project Creator : Vip-Augus
@Test
public void asyncProcessorIsOrderedLowestPrecedenceByDefault() {
AnnotationConfigApplicationContext ctx = new AnnotationConfigApplicationContext();
ctx.register(AsyncConfig.clreplaced);
ctx.refresh();
AsyncAnnotationBeanPostProcessor bpp = ctx.getBean(AsyncAnnotationBeanPostProcessor.clreplaced);
replacedertThat(bpp.getOrder(), is(Ordered.LOWEST_PRECEDENCE));
ctx.close();
}
19
View Source File : AbstractPointcutAdvisor.java
License : MIT License
Project Creator : Vip-Augus
License : MIT License
Project Creator : Vip-Augus
@Override
public int getOrder() {
if (this.order != null) {
return this.order;
}
Advice advice = getAdvice();
if (advice instanceof Ordered) {
return ((Ordered) advice).getOrder();
}
return Ordered.LOWEST_PRECEDENCE;
}
19
View Source File : SimpleBeanFactoryAwareAspectInstanceFactory.java
License : MIT License
Project Creator : Vip-Augus
License : MIT License
Project Creator : Vip-Augus
@Override
public int getOrder() {
if (this.beanFactory != null && this.aspectBeanName != null && this.beanFactory.isSingleton(this.aspectBeanName) && this.beanFactory.isTypeMatch(this.aspectBeanName, Ordered.clreplaced)) {
return ((Ordered) this.beanFactory.getBean(this.aspectBeanName)).getOrder();
}
return Ordered.LOWEST_PRECEDENCE;
}
19
View Source File : SingletonAspectInstanceFactory.java
License : MIT License
Project Creator : Vip-Augus
License : MIT License
Project Creator : Vip-Augus
/**
* Determine a fallback order for the case that the aspect instance
* does not express an instance-specific order through implementing
* the {@link org.springframework.core.Ordered} interface.
* <p>The default implementation simply returns {@code Ordered.LOWEST_PRECEDENCE}.
* @param aspectClreplaced the aspect clreplaced
*/
protected int getOrderForAspectClreplaced(Clreplaced<?> aspectClreplaced) {
return Ordered.LOWEST_PRECEDENCE;
}
19
View Source File : SingletonMetadataAwareAspectInstanceFactory.java
License : MIT License
Project Creator : Vip-Augus
License : MIT License
Project Creator : Vip-Augus
@Override
protected int getOrderForAspectClreplaced(Clreplaced<?> aspectClreplaced) {
return OrderUtils.getOrder(aspectClreplaced, Ordered.LOWEST_PRECEDENCE);
}
19
View Source File : BeanFactoryAspectInstanceFactory.java
License : MIT License
Project Creator : Vip-Augus
License : MIT License
Project Creator : Vip-Augus
/**
* Determine the order for this factory's target aspect, either
* an instance-specific order expressed through implementing the
* {@link org.springframework.core.Ordered} interface (only
* checked for singleton beans), or an order expressed through the
* {@link org.springframework.core.annotation.Order} annotation
* at the clreplaced level.
* @see org.springframework.core.Ordered
* @see org.springframework.core.annotation.Order
*/
@Override
public int getOrder() {
Clreplaced<?> type = this.beanFactory.getType(this.name);
if (type != null) {
if (Ordered.clreplaced.isreplacedignableFrom(type) && this.beanFactory.isSingleton(this.name)) {
return ((Ordered) this.beanFactory.getBean(this.name)).getOrder();
}
return OrderUtils.getOrder(type, Ordered.LOWEST_PRECEDENCE);
}
return Ordered.LOWEST_PRECEDENCE;
}
19
View Source File : ForwardRoutingFilterTests.java
License : Apache License 2.0
Project Creator : spring-cloud
License : Apache License 2.0
Project Creator : spring-cloud
@Test
public void orderIsLowestPrecedence() {
replacedertThat(forwardRoutingFilter.getOrder()).isEqualTo(Ordered.LOWEST_PRECEDENCE);
}
19
View Source File : ViewResolverRegistryTests.java
License : Apache License 2.0
Project Creator : SourceHot
License : Apache License 2.0
Project Creator : SourceHot
@Test
public void order() {
replacedertThat(this.registry.getOrder()).isEqualTo(Ordered.LOWEST_PRECEDENCE);
}
19
View Source File : EnableAsyncTests.java
License : Apache License 2.0
Project Creator : SourceHot
License : Apache License 2.0
Project Creator : SourceHot
@Test
public void asyncProcessorIsOrderedLowestPrecedenceByDefault() {
AnnotationConfigApplicationContext ctx = new AnnotationConfigApplicationContext();
ctx.register(AsyncConfig.clreplaced);
ctx.refresh();
AsyncAnnotationBeanPostProcessor bpp = ctx.getBean(AsyncAnnotationBeanPostProcessor.clreplaced);
replacedertThat(bpp.getOrder()).isEqualTo(Ordered.LOWEST_PRECEDENCE);
ctx.close();
}
19
View Source File : AbstractExtFactoryBean.java
License : Apache License 2.0
Project Creator : sofastack
License : Apache License 2.0
Project Creator : sofastack
public int getOrder() {
return Ordered.LOWEST_PRECEDENCE;
}
19
View Source File : VertxWebTestClientRegistrarTest.java
License : Apache License 2.0
Project Creator : snowdrop
License : Apache License 2.0
Project Creator : snowdrop
@Test
public void shouldHaveLowestPrecedence() {
replacedertThat(registrar.getOrder()).isEqualTo(Ordered.LOWEST_PRECEDENCE);
}
19
View Source File : MqBootstrapListener.java
License : Apache License 2.0
Project Creator : ppdaicorp
License : Apache License 2.0
Project Creator : ppdaicorp
@Override
public int getOrder() {
// TODO Auto-generated method stub
return Ordered.LOWEST_PRECEDENCE;
}
19
View Source File : AuthorizationHeaderFilter.java
License : Apache License 2.0
Project Creator : oktadeveloper
License : Apache License 2.0
Project Creator : oktadeveloper
@Override
public int filterOrder() {
return Ordered.LOWEST_PRECEDENCE;
}
19
View Source File : LoggingConfiguration.java
License : Apache License 2.0
Project Creator : odrotbohm
License : Apache License 2.0
Project Creator : odrotbohm
@Bean
static Advisor traceAdvisor() {
var pointcut = new AspectJExpressionPointcut();
pointcut.setExpression("bean(orderManagement)");
var advisor = new DefaultPointcutAdvisor(pointcut, interceptor());
advisor.setOrder(Ordered.LOWEST_PRECEDENCE);
return advisor;
}
19
View Source File : GrayFilter.java
License : Apache License 2.0
Project Creator : matevip
License : Apache License 2.0
Project Creator : matevip
@Override
public int getOrder() {
/**
* 值越大,优先级越低
*/
return Ordered.LOWEST_PRECEDENCE;
}
19
View Source File : ControllerAdviceBean.java
License : Apache License 2.0
Project Creator : langtianya
License : Apache License 2.0
Project Creator : langtianya
private static int initOrderFromBeanType(Clreplaced<?> beanType) {
return OrderUtils.getOrder(beanType, Ordered.LOWEST_PRECEDENCE);
}
19
View Source File : EnableAsyncTests.java
License : Apache License 2.0
Project Creator : langtianya
License : Apache License 2.0
Project Creator : langtianya
@Test
public void asyncProcessorIsOrderedLowestPrecedenceByDefault() {
AnnotationConfigApplicationContext ctx = new AnnotationConfigApplicationContext();
ctx.register(AsyncConfig.clreplaced);
ctx.refresh();
AsyncAnnotationBeanPostProcessor bpp = ctx.getBean(AsyncAnnotationBeanPostProcessor.clreplaced);
replacedertThat(bpp.getOrder(), is(Ordered.LOWEST_PRECEDENCE));
}
19
View Source File : SimpleBeanFactoryAwareAspectInstanceFactory.java
License : Apache License 2.0
Project Creator : langtianya
License : Apache License 2.0
Project Creator : langtianya
@Override
public int getOrder() {
if (this.beanFactory.isSingleton(this.aspectBeanName) && this.beanFactory.isTypeMatch(this.aspectBeanName, Ordered.clreplaced)) {
return ((Ordered) this.beanFactory.getBean(this.aspectBeanName)).getOrder();
}
return Ordered.LOWEST_PRECEDENCE;
}
19
View Source File : LogGlobalFilter.java
License : GNU General Public License v2.0
Project Creator : humingk
License : GNU General Public License v2.0
Project Creator : humingk
/**
* 此过滤器的优先级别最高
*
* @return
*/
@Override
public int getOrder() {
return Ordered.LOWEST_PRECEDENCE;
}
19
View Source File : AbstractNode.java
License : BSD 3-Clause "New" or "Revised" License
Project Creator : dhis2
License : BSD 3-Clause "New" or "Revised" License
Project Creator : dhis2
@Override
public int getOrder() {
if (isSimple()) {
if (((SimpleNode) this).isAttribute()) {
return 10;
}
return 20;
} else if (isComplex()) {
return 30;
} else if (isCollection()) {
return 40;
}
return Ordered.LOWEST_PRECEDENCE;
}
19
View Source File : ItemDataStartupLoader.java
License : Apache License 2.0
Project Creator : chanjarster
License : Apache License 2.0
Project Creator : chanjarster
@Override
public int getPhase() {
return Ordered.LOWEST_PRECEDENCE;
}
19
View Source File : DubboDefaultPropertiesEnvironmentPostProcessorTest.java
License : Apache License 2.0
Project Creator : apache
License : Apache License 2.0
Project Creator : apache
@Test
public void testOrder() {
replacedert.replacedertEquals(Ordered.LOWEST_PRECEDENCE, instance.getOrder());
}
19
View Source File : DubboConfigBeanDefinitionConflictApplicationListenerTest.java
License : Apache License 2.0
Project Creator : apache
License : Apache License 2.0
Project Creator : apache
@Test
public void testOrder() {
replacedert.replacedertEquals(Ordered.LOWEST_PRECEDENCE, new DubboConfigBeanDefinitionConflictProcessor().getOrder());
}
18
View Source File : ViewResolverRegistryTests.java
License : MIT License
Project Creator : Vip-Augus
License : MIT License
Project Creator : Vip-Augus
@Test
public void order() {
replacedertEquals(Ordered.LOWEST_PRECEDENCE, this.registry.getOrder());
this.registry.enableContentNegotiation();
replacedertEquals(Ordered.HIGHEST_PRECEDENCE, this.registry.getOrder());
}
18
View Source File : ConfigurationClassPostProcessor.java
License : MIT License
Project Creator : Vip-Augus
License : MIT License
Project Creator : Vip-Augus
@Override
public int getOrder() {
// within PriorityOrdered
return Ordered.LOWEST_PRECEDENCE;
}
18
View Source File : ViewResolverRegistryTests.java
License : Apache License 2.0
Project Creator : SourceHot
License : Apache License 2.0
Project Creator : SourceHot
@Test
public void order() {
replacedertThat(this.registry.getOrder()).isEqualTo(Ordered.LOWEST_PRECEDENCE);
this.registry.enableContentNegotiation();
replacedertThat(this.registry.getOrder()).isEqualTo(Ordered.HIGHEST_PRECEDENCE);
}
18
View Source File : ControllerAdviceBeanTests.java
License : Apache License 2.0
Project Creator : SourceHot
License : Apache License 2.0
Project Creator : SourceHot
@Test
public void orderedWithLowestPrecedenceByDefaultForBeanInstance() {
replacedertOrder(new SimpleControllerAdvice(), Ordered.LOWEST_PRECEDENCE);
}
18
View Source File : ControllerAdviceBeanTests.java
License : Apache License 2.0
Project Creator : SourceHot
License : Apache License 2.0
Project Creator : SourceHot
@Test
public void orderedWithLowestPrecedenceByDefaultForBeanName() {
replacedertOrder(SimpleControllerAdvice.clreplaced, Ordered.LOWEST_PRECEDENCE);
}
18
View Source File : SubscriptionExampleConfiguration.java
License : Apache License 2.0
Project Creator : otto-de
License : Apache License 2.0
Project Creator : otto-de
/**
* Configures some interceptors just to log the messages.
*
* @param registry MessageInterceptorRegistry used to register the interceptors.
*/
@Override
public void configureMessageInterceptors(final MessageInterceptorRegistry registry) {
registry.register(senderChannelsWith((message) -> {
LOG.info("Sending message {}", message);
return message;
}, Ordered.HIGHEST_PRECEDENCE));
registry.register(receiverChannelsWith((message) -> {
LOG.info("Received message {}", message);
return message;
}, Ordered.LOWEST_PRECEDENCE));
}
18
View Source File : BaseApplicationConfig.java
License : Apache License 2.0
Project Creator : miyabayt
License : Apache License 2.0
Project Creator : miyabayt
@Bean
public FilterRegistrationBean<ClearMDCFilter> clearMDCFilterBean() {
val filter = new ClearMDCFilter();
val bean = new FilterRegistrationBean<ClearMDCFilter>(filter);
bean.setOrder(Ordered.LOWEST_PRECEDENCE);
return bean;
}
17
View Source File : InterceptorRegistryTests.java
License : MIT License
Project Creator : Vip-Augus
License : MIT License
Project Creator : Vip-Augus
@Test
public void orderedInterceptors() {
this.registry.addInterceptor(this.interceptor1).order(Ordered.LOWEST_PRECEDENCE);
this.registry.addInterceptor(this.interceptor2).order(Ordered.HIGHEST_PRECEDENCE);
List<Object> interceptors = this.registry.getInterceptors();
replacedertEquals(2, interceptors.size());
replacedertSame(this.interceptor2, interceptors.get(0));
replacedertSame(this.interceptor1, interceptors.get(1));
}
17
View Source File : InterceptorRegistryTests.java
License : Apache License 2.0
Project Creator : SourceHot
License : Apache License 2.0
Project Creator : SourceHot
@Test
public void orderedInterceptors() {
this.registry.addInterceptor(this.interceptor1).order(Ordered.LOWEST_PRECEDENCE);
this.registry.addInterceptor(this.interceptor2).order(Ordered.HIGHEST_PRECEDENCE);
List<Object> interceptors = this.registry.getInterceptors();
replacedertThat(interceptors.size()).isEqualTo(2);
replacedertThat(interceptors.get(0)).isSameAs(this.interceptor2);
replacedertThat(interceptors.get(1)).isSameAs(this.interceptor1);
}
17
View Source File : InterceptorRegistryTests.java
License : MIT License
Project Creator : mindcarver
License : MIT License
Project Creator : mindcarver
@Test
public void orderedInterceptors() throws Exception {
this.registry.addInterceptor(this.interceptor1).order(Ordered.LOWEST_PRECEDENCE);
this.registry.addInterceptor(this.interceptor2).order(Ordered.HIGHEST_PRECEDENCE);
List<Object> interceptors = this.registry.getInterceptors();
replacedertEquals(2, interceptors.size());
replacedertSame(this.interceptor2, interceptors.get(0));
replacedertSame(this.interceptor1, interceptors.get(1));
}
17
View Source File : MicaXssConfiguration.java
License : GNU Lesser General Public License v3.0
Project Creator : lets-mica
License : GNU Lesser General Public License v3.0
Project Creator : lets-mica
@Override
public void addInterceptors(InterceptorRegistry registry) {
List<String> patterns = xssProperties.getPathPatterns();
if (patterns.isEmpty()) {
patterns.add("/**");
}
XssCleanInterceptor interceptor = new XssCleanInterceptor(xssProperties);
registry.addInterceptor(interceptor).addPathPatterns(patterns).excludePathPatterns(xssProperties.getPathExcludePatterns()).order(Ordered.LOWEST_PRECEDENCE);
}
17
View Source File : ImportDataConfiguration.java
License : Apache License 2.0
Project Creator : hank-cp
License : Apache License 2.0
Project Creator : hank-cp
@Bean
@ConditionalOnProperty(prefix = "spring.flyway", name = "import-data")
@DependsOn("flywayInitializer")
public FlywayDataImporter flywayDataImporter() {
FluentConfiguration flywayConf = plugin != null ? Flyway.configure(plugin.getWrapper().getPluginClreplacedLoader()) : Flyway.configure();
flywayConf.configuration(flyway.getConfiguration());
flywayConf.baselineVersion("0");
flywayConf.baselineOnMigrate(true);
flywayConf.locations("clreplacedpath:/db_data");
flywayConf.table("_db_data");
Flyway importDataFlyway = new Flyway(flywayConf);
FlywayDataImporter importer = new FlywayDataImporter(importDataFlyway);
importer.setOrder(Ordered.LOWEST_PRECEDENCE);
return importer;
}
16
View Source File : HealthConfiguration.java
License : Apache License 2.0
Project Creator : momobaiduren
License : Apache License 2.0
Project Creator : momobaiduren
@ConditionalOnProperty(name = "bsf.health.ping.enabled", havingValue = "true", matchIfMissing = true)
@Bean
@ConditionalOnWebApplication
public FilterRegistrationBean pingFilter() {
FilterRegistrationBean filterRegistrationBean = new FilterRegistrationBean();
// 优先注入
filterRegistrationBean.setOrder(Ordered.LOWEST_PRECEDENCE);
filterRegistrationBean.setFilter(new PingFilter());
filterRegistrationBean.setName("bsfpingFilter");
filterRegistrationBean.addUrlPatterns("/bsf/health/ping/");
LogUtils.info(HealthConfiguration.clreplaced, HealthProperties.Project, "health ping注册成功,访问:" + WebUtils.getBaseUrl() + "/bsf/health/ping/");
return filterRegistrationBean;
}
16
View Source File : BaseApplicationConfig.java
License : Apache License 2.0
Project Creator : miyabayt
License : Apache License 2.0
Project Creator : miyabayt
@Bean
public FilterRegistrationBean<LoginUserTrackingFilter> loginUserTrackingFilterBean() {
val filter = new LoginUserTrackingFilter();
filter.setExcludeUrlPatterns(Arrays.asList(WEBJARS_URL, STATIC_RESOURCES_URL));
val bean = new FilterRegistrationBean<LoginUserTrackingFilter>(filter);
bean.setOrder(Ordered.LOWEST_PRECEDENCE);
return bean;
}
16
View Source File : ShiroCasWebFilterConfiguration.java
License : Apache License 2.0
Project Creator : hiwepy
License : Apache License 2.0
Project Creator : hiwepy
@Bean(name = "filterShiroFilterRegistrationBean")
protected FilterRegistrationBean<AbstractShiroFilter> filterShiroFilterRegistrationBean() throws Exception {
FilterRegistrationBean<AbstractShiroFilter> filterRegistrationBean = new FilterRegistrationBean<AbstractShiroFilter>();
filterRegistrationBean.setFilter((AbstractShiroFilter) shiroFilterFactoryBean().getObject());
filterRegistrationBean.setOrder(Ordered.LOWEST_PRECEDENCE);
return filterRegistrationBean;
}
15
View Source File : WebMvcConfigurationSupportTests.java
License : MIT License
Project Creator : Vip-Augus
License : MIT License
Project Creator : Vip-Augus
@Test
public void mvcViewResolver() {
ApplicationContext context = initContext(WebConfig.clreplaced);
ViewResolverComposite resolver = context.getBean("mvcViewResolver", ViewResolverComposite.clreplaced);
replacedertNotNull(resolver);
replacedertEquals(1, resolver.getViewResolvers().size());
replacedertEquals(InternalResourceViewResolver.clreplaced, resolver.getViewResolvers().get(0).getClreplaced());
replacedertEquals(Ordered.LOWEST_PRECEDENCE, resolver.getOrder());
}
15
View Source File : XssConfiguration.java
License : GNU Lesser General Public License v3.0
Project Creator : chillzhuang
License : GNU Lesser General Public License v3.0
Project Creator : chillzhuang
/**
* 防XSS注入
*/
@Bean
public FilterRegistrationBean<XssFilter> xssFilterRegistration() {
FilterRegistrationBean<XssFilter> registration = new FilterRegistrationBean<>();
registration.setDispatcherTypes(DispatcherType.REQUEST);
registration.setFilter(new XssFilter(xssProperties, xssUrlProperties));
registration.addUrlPatterns("/*");
registration.setName("xssFilter");
registration.setOrder(Ordered.LOWEST_PRECEDENCE);
return registration;
}
14
View Source File : WebMvcConfigurationSupportTests.java
License : Apache License 2.0
Project Creator : SourceHot
License : Apache License 2.0
Project Creator : SourceHot
@Test
public void mvcViewResolver() {
ApplicationContext context = initContext(WebConfig.clreplaced);
ViewResolverComposite resolver = context.getBean("mvcViewResolver", ViewResolverComposite.clreplaced);
replacedertThat(resolver).isNotNull();
replacedertThat(resolver.getViewResolvers().size()).isEqualTo(1);
replacedertThat(resolver.getViewResolvers().get(0).getClreplaced()).isEqualTo(InternalResourceViewResolver.clreplaced);
replacedertThat(resolver.getOrder()).isEqualTo(Ordered.LOWEST_PRECEDENCE);
}
14
View Source File : EurekaServerAutoConfiguration.java
License : MIT License
Project Creator : dyc87112
License : MIT License
Project Creator : dyc87112
/**
* Register the Jersey filter
*/
@Bean
public FilterRegistrationBean jerseyFilterRegistration(javax.ws.rs.core.Application eurekaJerseyApp) {
FilterRegistrationBean bean = new FilterRegistrationBean();
bean.setFilter(new ServletContainer(eurekaJerseyApp));
bean.setOrder(Ordered.LOWEST_PRECEDENCE);
bean.setUrlPatterns(Collections.singletonList(EurekaConstants.DEFAULT_PREFIX + "/*"));
return bean;
}
13
View Source File : WebMvcConfigurationSupportTests.java
License : MIT License
Project Creator : Vip-Augus
License : MIT License
Project Creator : Vip-Augus
@Test
public void mvcViewResolverWithExistingResolver() throws Exception {
ApplicationContext context = initContext(WebConfig.clreplaced, ViewResolverConfig.clreplaced);
ViewResolverComposite resolver = context.getBean("mvcViewResolver", ViewResolverComposite.clreplaced);
replacedertNotNull(resolver);
replacedertEquals(0, resolver.getViewResolvers().size());
replacedertEquals(Ordered.LOWEST_PRECEDENCE, resolver.getOrder());
replacedertNull(resolver.resolveViewName("anyViewName", Locale.ENGLISH));
}
12
View Source File : WebMvcConfigurationSupportTests.java
License : Apache License 2.0
Project Creator : SourceHot
License : Apache License 2.0
Project Creator : SourceHot
@Test
public void mvcViewResolverWithExistingResolver() throws Exception {
ApplicationContext context = initContext(WebConfig.clreplaced, ViewResolverConfig.clreplaced);
ViewResolverComposite resolver = context.getBean("mvcViewResolver", ViewResolverComposite.clreplaced);
replacedertThat(resolver).isNotNull();
replacedertThat(resolver.getViewResolvers().size()).isEqualTo(0);
replacedertThat(resolver.getOrder()).isEqualTo(Ordered.LOWEST_PRECEDENCE);
replacedertThat(resolver.resolveViewName("anyViewName", Locale.ENGLISH)).isNull();
}
See More Examples