@Configuration
//配置文件位置
@PropertySource("classpath:city.properties")
//前缀
@ConfigurationProperties(prefix = "city")
public class CityProperties { private Map<String,Integer> map = new HashMap<>(); public Map<String, Integer> getMap() {
return map;
} public void setMap( Map<String, Integer> map) {
this.map = map;
}
}
city.map.V0441201=350
city.map.V0350600=351
city.map.V0520100=358
city.map.V0441800=363
city.map.V0330100=373
city.map.V0430400=374
city.map.V0130600=390 另一种   
@Value(value = "${R.host}")
public String Rhost; @Value(value = "${R.port}")
public String Rport; 在application中写
      
R.host=localhost
R.port=6311
												

最新文章

  1. PB12.5.2安装
  2. 在osx下通过vmware无GUI方式运行centos 7
  3. 前端排版-使用inline-block且两端对齐
  4. 封装jquery时用到的东西
  5. python解析页面上json字段
  6. ZOJ-2587-Unique Attack(最小割的唯一性)
  7. 【递推】【HDU2585】【hotel】
  8. iOS中常见的锁
  9. 我的第一个python web开发框架(18)——前台页面与接口整合
  10. WireShark捕获HTTPS
  11. Windows下的wget,命令行下载url
  12. vue 在全局设置cookie main.js文件
  13. ElasticSearch入门2: 基本用法
  14. (改进)Python语言实现词频统计
  15. C++ stringstream格式化输出输入探索
  16. 重写Checkbox 改写选择框的大小
  17. Linux stat命令详解
  18. Centos简介
  19. 用C#写一个实现进程监控的自动关机工具
  20. 基于Nginx+FastDFS搭建图片文件系统

热门文章

  1. Django中ORM对数据库的增删改查操作
  2. win10配置 samba
  3. System.exit(0)和System.exit(1)区别(转)
  4. GIL - global interpreter lock
  5. UE格式化XML文件
  6. Codeforces Round #499 (Div. 2) Problem-A-Stages(水题纠错)
  7. PAT甲级——A1154 VertexColoring【25】
  8. docker 安装 lnmp
  9. maven项目中 把依赖的jar包一起打包
  10. Python- 接口类-抽象类