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;
}