日期:2014-05-20 浏览次数:20917 次
// 我的com.aaa.bbb.XXXAction类中有一个函数。
// 使用这个函数的时候,传入的参数"/resources/cardName.properties"
private Properties readPropertiesValue(String filePath) {
Properties props = new Properties();
try {
Class<? extends CouponJKBAction> clazz = this.getClass();
// 从这里跳入函数内部,参数却变成了"com.aaa.bbb.XXXAction",这是怎么回事????
InputStream in = clazz.getResourceAsStream(filePath);
props.load(in);
} catch (Exception e) {
logger.error(e.getMessage());
}
return props;
}