limit:
??name:?張三user:
??name:?張三@RestController
public?class?TestController?{
????@Value("${limit.name}")
????String?limitName;
????@Value("${user.name}")
????String?userName;
????@GetMapping("/say")
????public?String?say()?{
????????return?"["+limitName+"]["+userName+"]";
????}
}訪問 http://127.0.0.1:8080/say 結果應該是[張三][張三]但是實際結果是[張三][Tony]?,每人運行結果可能不同百思不得其解,求高人指點?。?!
springboot讀取配置文件中的${user.name}讀到了別的內容
碧海云夭
2019-11-19 21:11:06