use of cn.taketoday.web.view.template.DefaultTemplateViewResolver in project today-framework by TAKETODAY.
the class HandlerMethodTests method setResultHandlers.
private void setResultHandlers(HandlerMethod produceMethod, ApplicationContext applicationContext) {
final ReturnValueHandlerManager resultHandlers = new ReturnValueHandlerManager();
resultHandlers.setApplicationContext(applicationContext);
resultHandlers.setViewResolver(new DefaultTemplateViewResolver());
resultHandlers.registerDefaultHandlers();
}
use of cn.taketoday.web.view.template.DefaultTemplateViewResolver in project today-framework by TAKETODAY.
the class ViewResolverRegistry method defaults.
/**
* Register framework expression language supports view resolver with the
* specified prefix and suffix.
* <p>When this method is invoked more than once, each call will register a
* new ViewResolver instance.
*/
public UrlBasedViewResolverRegistration defaults(String prefix, String suffix) {
DefaultTemplateViewResolver resolver = new DefaultTemplateViewResolver();
resolver.setPrefix(prefix);
resolver.setSuffix(suffix);
viewResolvers.add(resolver);
return new UrlBasedViewResolverRegistration(resolver);
}
Aggregations