使用:@Value("${}")来取值 例子: 配置文件:application.properties name=zhangsan 注意:访问的URL是通过两个@RequestMapping注解的内容拼接起来访问到的。 相关文章: