Props

Introduction

I am powerless against the widespread use of Properties. Sometimes, it is not easy to read and write Properties files conveniently. Therefore, I have made a simple encapsulation of Properties, providing a convenient constructor method (consistent with Setting) and getXXX methods consistent with Setting to extend the Properties class. The Props class inherits from Properties, so it can be compatible with the Properties class.

Usage

The usage of Props is consistent with Properties and Setting (both supported):

Props props = new Props("test.properties");
String user = props.getProperty("user");
String driver = props.getStr("driver");