资源文件读取

来源:互联网 发布:南博教育软件 编辑:程序博客网 时间:2024/06/06 02:03

示例:
1、资源文件配置
#系统的根入口(区域代码)
rootcode=34
2、后台controller读取

@Value("${rootcode}")

private String districtCode;


在方法中直接使用districtCode就能取值。



原创粉丝点击