method one:
Properties PROPS = New Properties (); Props.Load (BugFactory.class.getResourceAsStream ("xx.properties");
String name = props.getpropery ("xxxx");
At this time, XX.Properties should be placed with this class in the same directory.
Method Two:
ResourceBundle Res = ResourceBundle.getBundle ("YY.Properties");
String name = res. maxString ("YYYY");
YY.Properties should be placed in / web-inf / classes directory
I put XX.Properties in the / web-inf / class directory, I have been working for a long time.