使用常量不仅让代码变得简洁,更重要的是可以避免重复,在需要更改的时候,只需要修改一处,降低了错误发生的概率。

通过<properties>元素用户可以自定义一个或多个Maven属性,然后在POM的其他地方使用 ${属性名}的方式来引用该属性。

 <project>
<modelVersion>4.0.0</modelVersion>
<groupId>com.mycom.myapp</groupId>
<artifactId>myapp-util</artifactId>
<version>2.0.0-SNAPSHOT</version>
<name>util</name> <properties>
<springframework.version>4.1.2</springframework.version>
</properties> <dependencies>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-core</artifactId>
<version>${springframework.version}</version>
</dependency>
...
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-beans</artifactId>
<version>${springframework.version}</version>
</dependency>
</dependencies>
</project>

最新文章

  1. spring注解源码分析--how does autowired works?
  2. CI框架源码阅读笔记2 一切的入口 index.php
  3. throw er; // Unhandled &#39;error&#39; event
  4. JAVA Io 缓冲输入输出流
  5. vs2010 C#链接 ACCESS数据库
  6. iOS Provisioning Profile(Certificate)与Code Signing详解
  7. Virtio:针对 Linux 的 I/O 虚拟化框架
  8. 配置普通用户可以运行saltstack的模块
  9. u-boot ctr0.S详解 包含_main函数
  10. HDU 5783 Divide the Sequence
  11. 解决虚拟机ssh连接出错connection refused
  12. highstock
  13. EXE转JPG后缀格式工具(真实JPG后缀)
  14. C# 中如何判断字符串的相似度
  15. Hadoop记录-HDFS配额Quota
  16. python -- 约束、异常处理、MD5
  17. 状态机学习(六)解析JSON2
  18. Arduino IDE for ESP8266 项目(2)wifi扫描
  19. 数据库连接池优化配置(druid,dbcp,c3p0)
  20. [Error] &#39;exit&#39; was not declared in this scope的解决方法

热门文章

  1. C# 提交网页请求时出现如下错误: System.Net.WebException: 操作超时
  2. Android开发之Activity横竖屏切换生命周期重建问题
  3. map 函数----filter函数
  4. Leetcode分类刷题答案&amp;心得
  5. LVS原理详解
  6. Error 1606 Could Not Access Network Location %SystemDrive%/inetpub/wwwroot/ 的错误解决方法
  7. 微信小程序-关于重定向问题
  8. XCode8 App上传AppStore更新
  9. BZOJ 2007: [Noi2010]海拔
  10. css-css权威指南学习笔记8