本文整理汇总了Java中org.nutz.ioc.impl.PropertiesProxy.get方法的典型用法代码示例。如果您正苦于以下问题:Java PropertiesProxy.get方法的具体用法?Java PropertiesProxy.get怎么用?Java PropertiesProxy.get使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.nutz.ioc.impl.PropertiesProxy
的用法示例。
在下文中一共展示了PropertiesProxy.get方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: setPath
import org.nutz.ioc.impl.PropertiesProxy; //导入方法依赖的package包/类
@SuppressWarnings({ "unchecked", "rawtypes" })
public void setPath(String path) {
PropertiesProxy pp = new PropertiesProxy(path);
Map<String, Object> map = new LinkedHashMap(pp.toMap());
if (pp.get("openid") != null) {
String appid = pp.get("openid");
WxMaster def = Lang.map2Object(map, WxMaster.class);
masters.put(appid, def);
apis.put(appid, new WxApiImpl(def));
handlers.put(appid, new BasicWxHandler(def.getToken()));
}
for (Entry<String, Object> en : map.entrySet()) {
String key = en.getKey();
if (key.endsWith(".openid")) {
key = key.substring(0, key.indexOf('.'));
Map<String, Object> tmp = filter(map, key + ".", null, null, null);
String openid = tmp.get("openid").toString();
WxMaster one = Lang.map2Object(tmp, WxMaster.class);
masters.put(openid, one);
apis.put(openid, new WxApiImpl(one));
handlers.put(openid, new BasicWxHandler(one.getToken()));
}
}
}
示例2: configure
import org.nutz.ioc.impl.PropertiesProxy; //导入方法依赖的package包/类
public WxLoginImpl configure(PropertiesProxy conf, String prefix) {
prefix = Strings.sBlank(prefix);
appid = conf.get(prefix + "appid");
appsecret = conf.get(prefix + "appsecret");
host = conf.get(prefix + "host");
return this;
}
示例3: configure
import org.nutz.ioc.impl.PropertiesProxy; //导入方法依赖的package包/类
public BasicWxHandler configure(PropertiesProxy conf, String prefix){
prefix = Strings.sBlank(prefix);
token = conf.check(prefix+"token");
aeskey = conf.get(prefix+"aes");
appid = conf.get(prefix+"appid");
return this;
}
示例4: configure
import org.nutz.ioc.impl.PropertiesProxy; //导入方法依赖的package包/类
public WxApi2 configure(PropertiesProxy conf, String prefix) {
prefix = Strings.sBlank(prefix);
token = conf.check(prefix + "token");
appid = conf.get(prefix + "appid");
appsecret = conf.get(prefix + "appsecret");
openid = conf.get(prefix + "openid");
encodingAesKey = conf.get(prefix + "aes");
return this;
}
示例5: switchTo
import org.nutz.ioc.impl.PropertiesProxy; //导入方法依赖的package包/类
@Override
public void switchTo(ZDir home) {
this.home = home;
this.conf = new ZPageConfig();
// 看看有木有特殊的配置信息
ZFile zf = home.get("zpage.conf");
if (null != zf) {
PropertiesProxy pp = new PropertiesProxy(io.readString(zf));
conf.tmpl(pp.trim("zpage-tmpl", conf.tmpl()));
conf.libs(pp.trim("zpage-libs", conf.libs()));
conf.rs(Strings.splitIgnoreBlank(pp.trim("zpage-rs", "imgs,js,css")));
String rules = pp.get("zpage-rules", " .* : normal");
String[] lines = Strings.splitIgnoreBlank(rules, "\n");
List<ZPageRule> list = new ArrayList<ZPageRule>(lines.length);
for (String line : lines) {
int pos = line.lastIndexOf(':');
ZPageRule rule = new ZPageRule(Strings.trim(line.substring(0,
pos)),
Strings.trim(line.substring(pos + 1)));
list.add(rule);
}
}
}