如下:
@Value("${parms}") private String 自定义字段名;注:
parms为properties文件中自定义的参数名称
(小知识点)获取properties文件内容
原文:https://www.cnblogs.com/zeropc/p/14258298.html