address 1: http://localhost:8762/hello
address 2: http://localhost:8762/hello
access 1 has the same result as access 2.
expect that access 2 returns 404.
related code:
@RestController
public class HelloController {
@GetMapping("hello")
public String index() {
return "Hello World";
}
}
@SpringBootApplication
public class EurekaClientApplication extends WebMvcConfigurationSupport {
public static void main(String[] args) {
SpringApplication.run(EurekaClientApplication.class, args);
}
@Override
protected void configurePathMatch(PathMatchConfigurer configurer) {
configurer.setUseSuffixPatternMatch(false)
.setUseTrailingSlashMatch(false);
}
}