Make GzipFilterAutoConfiguration conditional on HttpMethod

GzipFilterProperties uses HttpMethod so GzipFilterAutoConfiguration,
which uses GzipFilterProperties, needs to be conditional on HttpMethod
being on the classpath.

Closes gh-3362
pull/3885/head
Andy Wilkinson 10 years ago
parent 76348e50e6
commit 5a1e66b3d6

@ -25,6 +25,7 @@ import org.springframework.boot.context.embedded.FilterRegistrationBean;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.http.HttpMethod;
/**
* {@link EnableAutoConfiguration Auto-configuration} for {@link GzipFilter}.
@ -33,7 +34,7 @@ import org.springframework.context.annotation.Configuration;
* @since 1.2.2
*/
@Configuration
@ConditionalOnClass(GzipFilter.class)
@ConditionalOnClass({ GzipFilter.class, HttpMethod.class })
@EnableConfigurationProperties(GzipFilterProperties.class)
public class GzipFilterAutoConfiguration {

Loading…
Cancel
Save