Skip to content

Commit

Permalink
Autoconfigure FreemarkerServletWebConfiguration conditional on Freema…
Browse files Browse the repository at this point in the history
…rkerViewResolver

Fixes problem where if Freemarker is present, but spring-webmvc isn't
present, then Spring Boot Autoconfigure will fail with ClassNotFoundException
  • Loading branch information
candrews committed Mar 29, 2022
1 parent 48fd7a9 commit 053c5ef
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
*/
@Configuration(proxyBeanMethods = false)
@ConditionalOnWebApplication(type = ConditionalOnWebApplication.Type.SERVLET)
@ConditionalOnClass({ Servlet.class, FreeMarkerConfigurer.class })
@ConditionalOnClass({ Servlet.class, FreeMarkerConfigurer.class, FreeMarkerViewResolver.class })
@AutoConfigureAfter(WebMvcAutoConfiguration.class)
class FreeMarkerServletWebConfiguration extends AbstractFreeMarkerConfiguration {

Expand Down

0 comments on commit 053c5ef

Please sign in to comment.