---
title: "Spring获取资源文件"
author: "androider"
date: "2012-03-30T14:23:06Z"
tags: []
categories: ["编程语言"]
slug: "spring"
draft: false
lastmod: "2012-03-30T14:23:06Z"
id: 1470521
url: "https://androider.iteye.com/blog/1470521"
---

ClassPathResource cr = new ClassPathResource("config/common-web.properties");//

        Properties pros = new Properties();

        try {

            pros.load(cr.getInputStream());

        } catch (IOException ex) {

        }