Search in sources :

Example 1 with Protected

use of app.web.interceptor.Protected in project core-ng-demo-project by neowu.

the class IndexController method index.

@Protected(operation = "index")
public Response index(Request request) {
    IndexPage model = new IndexPage();
    model.name = message.get("key.name", languageManager.language()).orElse("world not found");
    model.imageURL = "https://image.com/image123.jpg";
    // Session session = request.session();
    // //        Optional<String> hello = session.get("hello");
    // session.set("hello", "world");
    Response response = Response.html("/template/index.html", model, languageManager.language());
    response.cookie(Cookies.TEST, "1+2");
    response.cookie(Cookies.TEST1, "hello \"\" cookies");
    return response;
}
Also used : Response(core.framework.web.Response) Protected(app.web.interceptor.Protected)

Aggregations

Protected (app.web.interceptor.Protected)1 Response (core.framework.web.Response)1