本文整理汇总了Java中com.jfinal.ext.handler.ContextPathHandler类的典型用法代码示例。如果您正苦于以下问题:Java ContextPathHandler类的具体用法?Java ContextPathHandler怎么用?Java ContextPathHandler使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ContextPathHandler类属于com.jfinal.ext.handler包,在下文中一共展示了ContextPathHandler类的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: configHandler
import com.jfinal.ext.handler.ContextPathHandler; //导入依赖的package包/类
/** 配置处理器 */
@Override
public void configHandler(Handlers me) {
DruidStatViewHandler dvh = new DruidStatViewHandler("/druid");
me.add(dvh);
me.add(new ContextPathHandler("ctx_path"));
}
示例2: configHandler
import com.jfinal.ext.handler.ContextPathHandler; //导入依赖的package包/类
/**
* 配置处理器
*/
public void configHandler(Handlers me) {
// 全路径获取
me.add(new BasePathHandler(Config.getStr("PATH.BASE_PATH")));
// 根目录获取
me.add(new ContextPathHandler(Config.getStr("PATH.CONTEXT_PATH")));
// 当前获取
me.add(new CurrentPathHandler(Config.getStr("PATH.CURRENT_PATH")));
}
示例3: configHandler
import com.jfinal.ext.handler.ContextPathHandler; //导入依赖的package包/类
public void configHandler(Handlers me) {
me.add(new ContextPathHandler("host"));
me.add(new ActionExtentionHandler());
}
示例4: configHandler
import com.jfinal.ext.handler.ContextPathHandler; //导入依赖的package包/类
@Override
public void configHandler(Handlers handlers) {
handlers.add(new ContextPathHandler("ctx"));
final boolean monitorDB = GojaConfig.getPropertyToBoolean(GojaPropConst.DB_MONITOR, false);
if (monitorDB) {
final String view_url =
GojaConfig.getProperty(GojaPropConst.DB_MONITOR_URL, "/druid/monitor");
final DruidStatViewHandler dvh = new DruidStatViewHandler(view_url, new IDruidStatViewAuth() {
@Override
public boolean isPermitted(HttpServletRequest request) {
HttpSession hs = request.getSession(false);
return (hs != null);
}
});
handlers.add(dvh);
}
if (GojaConfig.isSecurity()) {
handlers.add(new CutSessionIdHandler());
}
// final List<Class> handler_clses = ClassBox.getInstance().getClasses(ClassType.HANDLER);
// if (handler_clses != null && !handler_clses.isEmpty()) {
// HandlerBind handlerBind;
// for (Class handler : handler_clses) {
// handlerBind = (HandlerBind) handler.getAnnotation(HandlerBind.class);
// if (handlerBind != null) {
// try {
// handlers.add((com.jfinal.handler.Handler) handler.newInstance());
// } catch (InstantiationException e) {
// logger.error("The Handler instance is error!", e);
// } catch (IllegalAccessException e) {
// logger.error("The Handler instance is error!", e);
// }
// }
// }
// }
}
示例5: configHandler
import com.jfinal.ext.handler.ContextPathHandler; //导入依赖的package包/类
@Override
public void configHandler(Handlers me) {
me.add(new ContextPathHandler("base"));
}
示例6: configHandler
import com.jfinal.ext.handler.ContextPathHandler; //导入依赖的package包/类
/**
* 配置处理器
*/
@Override
public void configHandler(Handlers me) {
me.add(new ContextPathHandler("basePath"));
}