Example usage for org.springframework.web.filter ShallowEtagHeaderFilter setWriteWeakETag

List of usage examples for org.springframework.web.filter ShallowEtagHeaderFilter setWriteWeakETag

Introduction

In this page you can find the example usage for org.springframework.web.filter ShallowEtagHeaderFilter setWriteWeakETag.

Prototype

public void setWriteWeakETag(boolean writeWeakETag) 

Source Link

Document

Set whether the ETag value written to the response should be weak, as per RFC 7232.

Usage

From source file:com.devnexus.ting.config.WebFilterConfig.java

@Bean
public FilterRegistrationBean etagFilterRegistrationBean() {

    final ShallowEtagHeaderFilter shallowEtagHeaderFilter = new ShallowEtagHeaderFilter();
    shallowEtagHeaderFilter.setWriteWeakETag(true);
    final FilterRegistrationBean registrationBean = new FilterRegistrationBean();

    registrationBean.setFilter(shallowEtagHeaderFilter);
    registrationBean.addUrlPatterns("/s/*");
    registrationBean.setOrder(3);// w w w.  ja v  a  2 s  . co  m
    return registrationBean;
}