@Retention(value=RUNTIME) @Target(value=PARAMETER) public @interface Flash
Bind a Mvc parameter to a Request.flash(String)
flash attribute.
@Path("/r") class Resources { @Get public void method(@Flash Map<String, String> flash) { } }Accessing to a flash attribute:
@Path("/r") class Resources { @Get public void method(@Flash String success) { } }Accessing to an optional flash attribute:
@Path("/r") class Resources { @Get public void method(@Flash Optional<String> success) { } }
FlashScope
Copyright © 2019. All rights reserved.