---
title: "读取Properties文件（单例模式）"
author: "Cloudyxuq"
date: "2011-10-04T14:58:00Z"
tags: []
slug: "properties"
draft: false
lastmod: "2012-05-16T13:13:06Z"
id: 1532638
url: "https://cloudyxuq.iteye.com/blog/1532638"
---

列子：如何用单例模式读取配置文件信息，用以避免过多创建对象，浪费资源

db.properties文件用来存放数据库的相关信息

单例类读取信息：