//jsp
@Bean
public ViewResolver getJspViewResolver() {
InternalResourceViewResolver internalResourceViewResolver = new InternalResourceViewResolver();
internalResourceViewResolver.setPrefix("/WEB-INF/jsp/");
internalResourceViewResolver.setSuffix(".jsp");
internalResourceViewResolver.setOrder(1);
return internalResourceViewResolver;
}
//freemaker
@Bean
public FreeMarkerViewResolver getFreeMarkerViewResolver(){
FreeMarkerViewResolver freeMarkerViewResolver = new FreeMarkerViewResolver();
freeMarkerViewResolver.setPrefix("");
freeMarkerViewResolver.setSuffix(".ftl");
freeMarkerViewResolver.setOrder(0);
freeMarkerViewResolver.setRequestContextAttribute("request");
freeMarkerViewResolver.setContentType("text/html;charset=UTF-8");
return freeMarkerViewResolver;
}