Spring Boot如何在@requestMapping中传递配置/动态URL?

Jak*_*kka 3 spring spring-boot

如何在Spring-Boot中传递String值@RequestMapping("/test").

我想传递String str ="/test"String值RequestMapping(str),请建议如何读取Request Mapping中的String值.

iam*_*ddy 7

这应该适用 @RequestMapping("${test.str.value}")于你的application.proprties/yml test.str.value = /test