此方式可以使用 SpEL 表达式如 #{30-15}
SpEL 表达式
#{30-15}
可以获取配置文件中的值 如 ${jwt.secret}
其它注意事项
@Value注解的使用
原文:https://www.cnblogs.com/dadiwm321/p/12301781.html