Configuration failing with spring-boot-thymeleaf-email
Mithradatha opened this issue · 2 comments
Note
Everything, outside of Thymeleaf templating, works find using spring-boot-email-core.
Startup fails when using spring-boot-thymeleaf-email.
@EnableAsync
@EnableCaching
@EnableEmailTools
@SpringBootApplication
public class Proj {}
Exception:
2018-08-29 10:03:02.568 WARN 17040 --- [ost-startStop-1] ConfigServletWebServerApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'thymeleafTemplateService' defined in URL [jar:file:/C:/Projects/STS/Workspace1/.metadata/.plugins/org.eclipse.wst.server.core/tmp1/wtpwebapps/Proj/WEB-INF/lib/spring-boot-thymeleaf-email-0.6.3.jar!/it/ozimov/springboot/mail/templating/service/ThymeleafTemplateService.class]: Post-processing of merged bean definition failed; nested exception is java.lang.IllegalStateException: Failed to introspect Class [it.ozimov.springboot.mail.templating.service.ThymeleafTemplateService] from ClassLoader [ParallelWebappClassLoader
context: Proj
delegate: false
----------> Parent Classloader:
java.net.URLClassLoader@baf30c
]
[Relevant] Pom.xml:
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.0.2.RELEASE</version>
<relativePath />
</parent>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-mail</artifactId>
</dependency>
<dependency>
<groupId>it.ozimov</groupId>
<artifactId>spring-boot-thymeleaf-email</artifactId>
<version>0.6.3</version>
</dependency>
<dependency>
<groupId>org.thymeleaf.extras</groupId>
<artifactId>thymeleaf-extras-springsecurity4</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>net.sourceforge.nekohtml</groupId>
<artifactId>nekohtml</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-thymeleaf</artifactId>
</dependency>
<dependency>
<groupId>nz.net.ultraq.thymeleaf</groupId>
<artifactId>thymeleaf-layout-dialect</artifactId>
</dependency>
[Relevant] Properties:
spring.mail.host=mymail@server.com
spring.mail.scheduler.persistence.enabled=false
spring.mail.scheduler.persistence.redis.embedded=false
spring.mail.scheduler.persistence.redis.enabled=false
spring.thymeleaf.mode=HTML
spring.thymeleaf.cache=false
Is this an issue with Spring boot 2.0 compatibility? If so, is there a way to make it work or should I abandon all hope?
There is an open migration towards SpringBoot2. It is referred into issue #72.
Unfortunately I still have a couple of tests failing and not so much time to spend on this. You can pickup the branch and try to fix them. The branch is here: https://github.com/ozimov/spring-boot-email-tools/tree/feature/move-to-spring-boot-2.0.x