About the problem of spring boot url path matching slash "/"?

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);
    }
}
Apr.02,2021

setUseTrailingSlashMatch (true);
is set to true to be a strict match. You can return 404

.
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b34d73-2bf4c.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b34d73-2bf4c.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?