code commit for BAEL-4869

This commit is contained in:
Bhabani Prasad Patel
2021-05-27 02:12:22 +05:30
parent b0464bd691
commit a40d2ff3b3
5 changed files with 134 additions and 0 deletions
@@ -0,0 +1,15 @@
package com.baeldung.sampleapp.config;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
@Configuration
@ComponentScan({ "com.baeldung.sampleapp.web" })
public class MaxHTTPHeaderSizeConfig implements WebMvcConfigurer {
public MaxHTTPHeaderSizeConfig() {
super();
}
}
@@ -0,0 +1,17 @@
package com.baeldung.sampleapp.web.controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestHeader;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
@RestController
@RequestMapping(value = "/request-header-test")
public class MaxHttpHeaderSizeController {
@GetMapping
public boolean testMaxHTTPHeaderSize(@RequestHeader(value = "token") String token) {
return true;
}
}