Use Ordered.HIGHEST_PRECEDENCE constants
Use Ordered.HIGHEST_PRECEDENCE rather than Integer.MIN_VALUE. Closes gh-4335
This commit is contained in:
parent
9f8eda18b7
commit
83e8bfedb2
|
|
@ -18,6 +18,7 @@ package org.springframework.boot.autoconfigure.social;
|
|||
|
||||
import java.util.List;
|
||||
|
||||
import org.springframework.core.Ordered;
|
||||
import org.thymeleaf.spring4.SpringTemplateEngine;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
|
@ -104,7 +105,7 @@ public class SocialWebAutoConfiguration {
|
|||
@ConditionalOnProperty(prefix = "spring.social", name = "auto-connection-views")
|
||||
public BeanNameViewResolver beanNameViewResolver() {
|
||||
BeanNameViewResolver viewResolver = new BeanNameViewResolver();
|
||||
viewResolver.setOrder(Integer.MIN_VALUE);
|
||||
viewResolver.setOrder(Ordered.HIGHEST_PRECEDENCE);
|
||||
return viewResolver;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -317,7 +317,7 @@ public class WebMvcAutoConfiguration {
|
|||
@Bean
|
||||
public SimpleUrlHandlerMapping faviconHandlerMapping() {
|
||||
SimpleUrlHandlerMapping mapping = new SimpleUrlHandlerMapping();
|
||||
mapping.setOrder(Integer.MIN_VALUE + 1);
|
||||
mapping.setOrder(Ordered.HIGHEST_PRECEDENCE + 1);
|
||||
mapping.setUrlMap(Collections.singletonMap("**/favicon.ico",
|
||||
faviconRequestHandler()));
|
||||
return mapping;
|
||||
|
|
|
|||
|
|
@ -61,7 +61,7 @@ public class ContextIdApplicationContextInitializer implements
|
|||
|
||||
private final String name;
|
||||
|
||||
private int order = Integer.MAX_VALUE - 10;
|
||||
private int order = Ordered.LOWEST_PRECEDENCE - 10;
|
||||
|
||||
public ContextIdApplicationContextInitializer() {
|
||||
this(NAME_PATTERN);
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ import org.springframework.web.context.ConfigurableWebApplicationContext;
|
|||
public class ServletContextApplicationContextInitializer implements
|
||||
ApplicationContextInitializer<ConfigurableWebApplicationContext>, Ordered {
|
||||
|
||||
private int order = Integer.MIN_VALUE;
|
||||
private int order = Ordered.HIGHEST_PRECEDENCE;
|
||||
|
||||
private final ServletContext servletContext;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue