Fix warnings

This commit is contained in:
Phillip Webb
2015-09-05 00:21:09 -07:00
parent 85bb347fba
commit 690da89c82
22 changed files with 8 additions and 72 deletions

View File

@@ -82,9 +82,6 @@ public class EndpointWebMvcChildContextConfiguration {
@Value("${error.path:/error}")
private String errorPath = "/error";
@Autowired
private ManagementServerProperties managementServerProperties;
@Bean(name = DispatcherServletAutoConfiguration.DEFAULT_DISPATCHER_SERVLET_BEAN_NAME)
public DispatcherServlet dispatcherServlet() {
DispatcherServlet dispatcherServlet = new DispatcherServlet();

View File

@@ -67,7 +67,6 @@ import com.fasterxml.jackson.annotation.JsonAnyGetter;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonInclude.Include;
import com.fasterxml.jackson.annotation.JsonUnwrapped;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement;
import static org.springframework.hateoas.mvc.ControllerLinkBuilder.linkTo;
@@ -219,17 +218,11 @@ public class EndpointWebMvcHypermediaManagementContextConfiguration {
@ControllerAdvice(assignableTypes = MvcEndpoint.class)
public static class MvcEndpointAdvice implements ResponseBodyAdvice<Object> {
@Autowired
private ManagementServerProperties management;
@Autowired
private HttpMessageConverters converters;
private Map<MediaType, HttpMessageConverter<?>> converterCache = new ConcurrentHashMap<MediaType, HttpMessageConverter<?>>();
@Autowired
private ObjectMapper mapper;
@Override
public boolean supports(MethodParameter returnType,
Class<? extends HttpMessageConverter<?>> converterType) {

View File

@@ -41,7 +41,6 @@ import org.springframework.boot.autoconfigure.condition.ConditionalOnBean;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.boot.autoconfigure.condition.SpringBootCondition;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ConditionContext;
import org.springframework.context.annotation.Conditional;
@@ -62,9 +61,6 @@ import org.springframework.web.cors.CorsConfiguration;
EndpointCorsProperties.class })
public class EndpointWebMvcManagementContextConfiguration {
@Autowired
private ApplicationContext applicationContext;
@Autowired
private HealthMvcEndpointProperties healthMvcEndpointProperties;

View File

@@ -22,7 +22,6 @@ import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.actuate.autoconfigure.BrowserPathHypermediaIntegrationTests.SpringBootHypermediaApplication;
import org.springframework.boot.actuate.endpoint.mvc.ActuatorHalBrowserEndpoint;
import org.springframework.boot.actuate.endpoint.mvc.MvcEndpoints;
import org.springframework.boot.test.SpringApplicationConfiguration;
import org.springframework.context.annotation.Configuration;
import org.springframework.http.MediaType;
@@ -57,9 +56,6 @@ public class BrowserPathHypermediaIntegrationTests {
@Autowired
private WebApplicationContext context;
@Autowired
private MvcEndpoints mvcEndpoints;
private MockMvc mockMvc;
@Before

View File

@@ -20,8 +20,6 @@ import java.util.Map;
import org.junit.After;
import org.junit.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.context.properties.ConfigurationBeanFactoryMetaData;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.ConfigurableApplicationContext;
@@ -115,9 +113,6 @@ public class ConfigurationPropertiesReportEndpointParentTests {
@EnableConfigurationProperties
public static class Factory {
@Autowired
private ConfigurationBeanFactoryMetaData beanFactoryMetaData;
@Bean
public ConfigurationPropertiesReportEndpoint endpoint() {
return new ConfigurationPropertiesReportEndpoint();

View File

@@ -55,9 +55,6 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.
@WebAppConfiguration
public class JolokiaMvcEndpointContextPathTests {
@Autowired
private MvcEndpoints endpoints;
@Autowired
private WebApplicationContext context;