我的配置为server: port: 8080 context-path: /bootuserName: Careypassword: rootcontent: "name: ${userName}, password:${password}"Controller为@RestControllerpublic class HelloController{ @Value("${userName}") private String userName; @Value("${password}") private String password; @Value("${content}") private String content; @RequestMapping(value="/test", method= RequestMethod.GET) public String test(){ return content; }}但页面返回的值中的uerName是lenovo 。。就是我的电脑。。==
添加回答
举报
0/150
提交
取消