I have the same problem, I would like to upgrade from Spring Boot 1.3.8 to 1.4.2. Because it was a pain, updating everything in one go, I am preparing my project from part to part. After I upgraded to Hibernate5, I already found this post that it is possible to update thimeleaf. I use thimeleaf with Apache slabs. I have the same error java.lang.ClassNotFoundException: org.thymeleaf.resourceresolver.IResourceResolver
What I have now in Parent POM:
<properties> <java-version>1.8</java-version> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <hibernate.version>5.0.11.Final</hibernate.version> <thymeleaf.version>3.0.2.RELEASE</thymeleaf.version> <thymeleaf-layout-dialect.version>2.0.4</thymeleaf-layout-dialect.version> <com.mysema.querydsl-version>[3.7.1,3.8.0)</com.mysema.querydsl-version> </properties>
My configuration file:
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Value; import org.springframework.boot.autoconfigure.AutoConfigureAfter; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.boot.autoconfigure.condition.ConditionalOnClass; import org.springframework.boot.autoconfigure.thymeleaf.ThymeleafProperties; import org.springframework.boot.autoconfigure.web.WebMvcAutoConfiguration; import org.springframework.boot.context.properties.EnableConfigurationProperties; import org.springframework.context.ApplicationContext; import org.springframework.context.ApplicationContextAware; import org.springframework.context.annotation.Bean; import org.springframework.web.servlet.config.annotation.AsyncSupportConfigurer; import org.springframework.web.servlet.config.annotation.WebMvcConfigurationSupport; import org.thymeleaf.extras.tiles2.dialect.TilesDialect; import org.thymeleaf.extras.tiles2.spring4.web.configurer.ThymeleafTilesConfigurer; import org.thymeleaf.extras.tiles2.spring4.web.view.ThymeleafTilesView; import org.thymeleaf.spring4.SpringTemplateEngine; import org.thymeleaf.spring4.view.ThymeleafViewResolver; import at.hemisoft.bbsng.client.mvc.TimeoutCallableProcessingInterceptor; @SpringBootApplication(exclude={org.springframework.boot.autoconfigure.thymeleaf.ThymeleafAutoConfiguration.class}) @EnableConfigurationProperties(ThymeleafProperties.class) @ConditionalOnClass(SpringTemplateEngine.class) @AutoConfigureAfter(WebMvcAutoConfiguration.class) public class WebMvcConfig extends WebMvcConfigurationSupport implements ApplicationContextAware{ @Autowired private ApplicationContext applicationContext; @Autowired public SpringTemplateEngine templateEngine; @Bean public ThymeleafTilesConfigurer tilesConfigurer() { final ThymeleafTilesConfigurer configurer = new ThymeleafTilesConfigurer(); configurer.setDefinitions("classpath*:/templates/**/views.xml"); return configurer; } @Bean public ThymeleafViewResolver thymeleafViewResolver() { final ThymeleafViewResolver resolver = new ThymeleafViewResolver(); resolver.setApplicationContext(applicationContext); resolver.setViewClass(ThymeleafTilesView.class); resolver.setTemplateEngine(templateEngine); resolver.setCharacterEncoding(UTF_8); return resolver; } @Bean public TilesDialect tilesDialect() { return new TilesDialect(); }
On startup, I get:
java.lang.IllegalStateException: Could not evaluate condition on org.springframework.boot.autoconfigure.web.HttpEncodingAutoConfiguration
source share