// Expose Thymeleaf's own evaluation context as a model variable
final ConversionService conversionService =
(ConversionService) request.getAttribute(ConversionService.class.getName()); // might be null!
final ThymeleafEvaluationContext evaluationContext =
new ThymeleafEvaluationContext(applicationContext, conversionService);
mergedModel.put(ThymeleafEvaluationContext.THYMELEAF_EVALUATION_CONTEXT_CONTEXT_VARIABLE_NAME, evaluationContext);
final SpringWebContext context =
new SpringWebContext(request, response, servletContext, getLocale(), mergedModel, getApplicationContext());