@Test public void svgViewResolver() { final SpringTemplateEngine templateEngine = mock(SpringTemplateEngine.class); final ThymeleafViewResolver viewResolver = config.svgViewResolver(templateEngine); assertThat(viewResolver.getTemplateEngine()).isEqualTo(templateEngine); assertThat(viewResolver.getOrder()).isEqualTo(0); assertThat(viewResolver.getCharacterEncoding()).isEqualTo("UTF-8"); assertThat(viewResolver.getContentType()).isEqualTo("image/svg+xml"); assertThat(viewResolver.getViewNames()).isEqualTo(new String[] {"*.svg"}); }
@Bean public ThymeleafViewResolver svgViewResolver(final SpringTemplateEngine templateEngine) { final ThymeleafViewResolver thymeleafViewResolver = new ThymeleafViewResolver(); thymeleafViewResolver.setTemplateEngine(templateEngine); thymeleafViewResolver.setOrder(0); thymeleafViewResolver.setCharacterEncoding("UTF-8"); thymeleafViewResolver.setContentType("image/svg+xml"); thymeleafViewResolver.setViewNames(new String[] {"*.svg"}); return thymeleafViewResolver; }
ThymeleafSvgConfig implements ApplicationContextAware { @Bean public ThymeleafViewResolver svgViewResolver(final SpringTemplateEngine templateEngine) { final ThymeleafViewResolver thymeleafViewResolver = new ThymeleafViewResolver(); thymeleafViewResolver.setTemplateEngine(templateEngine); thymeleafViewResolver.setOrder(0); thymeleafViewResolver.setCharacterEncoding("UTF-8"); thymeleafViewResolver.setContentType("image/svg+xml"); thymeleafViewResolver.setViewNames(new String[] {"*.svg"}); return thymeleafViewResolver; } }
ThymeleafSvgConfig implements ApplicationContextAware { @Bean public ThymeleafViewResolver svgViewResolver(final SpringTemplateEngine templateEngine) { final ThymeleafViewResolver thymeleafViewResolver = new ThymeleafViewResolver(); thymeleafViewResolver.setTemplateEngine(templateEngine); thymeleafViewResolver.setOrder(0); thymeleafViewResolver.setCharacterEncoding("UTF-8"); thymeleafViewResolver.setContentType("image/svg+xml"); thymeleafViewResolver.setViewNames(new String[] {"*.svg"}); return thymeleafViewResolver; }  }
ThymeleafSvgConfig implements ApplicationContextAware { @Bean public ThymeleafViewResolver svgViewResolver(final SpringTemplateEngine templateEngine) { final ThymeleafViewResolver thymeleafViewResolver = new ThymeleafViewResolver(); thymeleafViewResolver.setTemplateEngine(templateEngine); thymeleafViewResolver.setOrder(0); thymeleafViewResolver.setCharacterEncoding("UTF-8"); thymeleafViewResolver.setContentType("image/svg+xml"); thymeleafViewResolver.setViewNames(new String[] {"*.svg"}); return thymeleafViewResolver; }  @Bean ITemplateResolver svgTemplateResolver(); @Bean ThymeleafViewResolver svgViewResolver(final SpringTemplateEngine templateEngine); @Override void setApplicationContext(final ApplicationContext applicationContext); }
ThymeleafSvgConfig implements ApplicationContextAware { @Bean public ThymeleafViewResolver svgViewResolver(final SpringTemplateEngine templateEngine) { final ThymeleafViewResolver thymeleafViewResolver = new ThymeleafViewResolver(); thymeleafViewResolver.setTemplateEngine(templateEngine); thymeleafViewResolver.setOrder(0); thymeleafViewResolver.setCharacterEncoding("UTF-8"); thymeleafViewResolver.setContentType("image/svg+xml"); thymeleafViewResolver.setViewNames(new String[] {"*.svg"}); return thymeleafViewResolver; }  @Bean ITemplateResolver svgTemplateResolver(); @Bean ThymeleafViewResolver svgViewResolver(final SpringTemplateEngine templateEngine); @Override void setApplicationContext(final ApplicationContext applicationContext);  }