001package io.jstach.opt.spring.webflux; 002 003import java.util.Map; 004 005import org.springframework.web.server.ServerWebExchange; 006 007/** 008 * User can provide instances in the application context and they will be applied to each 009 * {@link JStachioModelView} instance before rendering. 010 * 011 * @author dsyer 012 */ 013public interface JStachioModelViewConfigurer { 014 015 /** 016 * Configures a JStache model with the current request and traditional Spring model 017 * before being rendered. 018 * <p> 019 * This is useful to add specific request meta data like CSRF token to the JStache 020 * model so that the Controllers do not have to worry about doing that. 021 * @param page the current {@link io.jstach.jstache.JStache} model 022 * @param model the current model 023 * @param request the current request context 024 */ 025 void configure(Object page, Map<String, Object> model, ServerWebExchange request); 026 027}