WEB-INF路径
String path = WsTestBOImpl.class.getClass().getResource("/").getPath();
path = path.substring(1, path.indexOf("classes")); web-inf 下面的classses路径(也就是src路径)
String path = WsTestBOImpl.class.getClass().getResource("/").getPath();
path = path.substring(1, path.length()); --获取.properties配置文件的值--
Properties p = new Properties();
p.load(new FileInputStream(path + "aaa.properties"));
String s = p.getProperty("name");

http://blog.csdn.net/fancylovejava/article/details/7577294

最新文章

  1. rpc使用JUnit模块测试设计的方法及常见问题
  2. hdu1520 Anniversary party (树形dp)
  3. git 基本配置及使用
  4. Ibatis对日期的处理
  5. Spring整合Tiles
  6. 用imageROI来增加某范围的像素
  7. Implementation Documentation[转]
  8. poj 1986
  9. Netty4.x中文教程系列(四) 对象传输
  10. Unity3D 问题流水总结
  11. UVA-548Tree(二叉树的递归遍历)
  12. Windows文件监视器 1.0 绿色版
  13. mysql触发器的使用
  14. leetcode range sum query
  15. JDK10安装配置详解
  16. vue的基本指令
  17. C# float与UInt16互转
  18. Intellij IDEA使用Docker插件部署应用
  19. mysql 用户及权限
  20. centos7 安装、使用git

热门文章

  1. Android Studio modify language level to Java 8
  2. Scala function programming
  3. asp.net webapi 使用小结
  4. 微信营销 推广 会议签到 活动签到 复用微信3D动画签到系统
  5. svn资源库url问题
  6. C#异步了解一下
  7. fiddler之弱网测试
  8. 游戏测试中遇到的奇葩bug(不断整理中...)
  9. EasyUI 布局 - 动态添加标签页(Tabs)
  10. 【iOS开发】字典的快速赋值 setValuesForKeysWithDictionary