- 使用 Spring Initializr 创建 Spring Boot 应用程序
- 在Spring Boot中配置Cassandra
- 在 Spring Boot 上配置 Tomcat 连接池
- 将Camel消息路由到嵌入WildFly的Artemis上
本文整理了Java中com.jetdrone.vertx.yoke.middleware.YokeRequest.createSession()
方法的一些代码示例,展示了YokeRequest.createSession()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。YokeRequest.createSession()
方法的具体详情如下:
包路径:com.jetdrone.vertx.yoke.middleware.YokeRequest
类名称:YokeRequest
方法名:createSession
[英]Create a new Session and store it with the underlying storage. Internally create a entry in the request context under the name "session" and add a end handler to save that object once the execution is terminated.
[中]创建一个新会话并将其与基础存储一起存储。在请求上下文中内部创建一个名为“session”的条目,并添加一个结束处理程序,以便在执行终止后保存该对象。
代码示例来源:origin: pmlopes/yoke
/** Create a new Session and store it with the underlying storage.
* Internally create a entry in the request context under the name "session" and add a end handler to save that
* object once the execution is terminated.
*
* @return {JsonObject} session
*/
public JsonObject createSession() {
final String sessionId = UUID.randomUUID().toString();
return createSession(sessionId);
}
代码示例来源:origin: pmlopes/yoke
@Override
public void handle(JsonObject user) {
if (user != null) {
JsonObject session = request.createSession();
session.put("user", request.getFormAttribute("username"));
// get the redirect_url parameter
String redirect = request.getParam("redirect_url", "/");
request.response().redirect(Utils.decodeURIComponent(redirect));
} else {
if (loginTemplate != null) {
// render internal login
request.response().setContentType("text/html");
request.response().setStatusCode(401);
request.response().end(
loginTemplate.replace("{title}", (String) request.get("title"))
.replace("{action}", loginURI + "?redirect_url=" + Utils.encodeURIComponent(request.getParam("redirect_url", "/")))
.replace("{message}", "Invalid username and/or password, please try again."));
} else {
next.handle(401);
}
}
}
});
代码示例来源:origin: pmlopes/yoke
next.handle(null);
} else {
session = request.createSession();
本文整理了Java中com.jetdrone.vertx.yoke.middleware.YokeRequest.formAttributes()方法的一些代码示例,展示了YokeRequest.fo
本文整理了Java中com.jetdrone.vertx.yoke.middleware.YokeRequest.method()方法的一些代码示例,展示了YokeRequest.method()的具
本文整理了Java中com.jetdrone.vertx.yoke.middleware.YokeRequest.getHeader()方法的一些代码示例,展示了YokeRequest.getHead
本文整理了Java中com.jetdrone.vertx.yoke.middleware.YokeRequest.accepts()方法的一些代码示例,展示了YokeRequest.accepts()
本文整理了Java中com.jetdrone.vertx.yoke.middleware.YokeRequest.path()方法的一些代码示例,展示了YokeRequest.path()的具体用法。
本文整理了Java中com.jetdrone.vertx.yoke.middleware.YokeRequest.body()方法的一些代码示例,展示了YokeRequest.body()的具体用法。
本文整理了Java中com.jetdrone.vertx.yoke.middleware.YokeRequest.headers()方法的一些代码示例,展示了YokeRequest.headers()
本文整理了Java中com.jetdrone.vertx.yoke.middleware.YokeRequest.isSSL()方法的一些代码示例,展示了YokeRequest.isSSL()的具体用
本文整理了Java中com.jetdrone.vertx.yoke.middleware.YokeRequest.createSession()方法的一些代码示例,展示了YokeRequest.cre
本文整理了Java中com.jetdrone.vertx.yoke.middleware.YokeRequest.uri()方法的一些代码示例,展示了YokeRequest.uri()的具体用法。这些
本文整理了Java中com.jetdrone.vertx.yoke.middleware.YokeRequest.params()方法的一些代码示例,展示了YokeRequest.params()的具
本文整理了Java中com.jetdrone.vertx.yoke.middleware.YokeRequest.response()方法的一些代码示例,展示了YokeRequest.response
本文整理了Java中com.jetdrone.vertx.yoke.middleware.YokeRequest.get()方法的一些代码示例,展示了YokeRequest.get()的具体用法。这些
我是一名优秀的程序员,十分优秀!