Closed detectivevivacious closed 3 weeks ago
When I use Spring Boot 3.x with the same configuration as in Boot 2.x, an error is occurs(the file "error.hbs" exists in /resources/templates/error.hbs)
java.io.FileNotFoundException: classpath:templates/templates/error.hbs
at com.github.jknack.handlebars.io.URLTemplateLoader.sourceAt(URLTemplateLoader.java:70) ~[handlebars-4.2.0.jar:na]
at com.github.jknack.handlebars.Handlebars.compile(Handlebars.java:438) ~[handlebars-4.2.0.jar:na]
at com.github.jknack.handlebars.Handlebars.compile(Handlebars.java:419) ~[handlebars-4.2.0.jar:na]
at com.github.jknack.handlebars.springmvc.HandlebarsViewResolver.configure(HandlebarsViewResolver.java:199) ~[handlebars-springmvc-4.2.0.jar:na]
at com.github.jknack.handlebars.springmvc.HandlebarsViewResolver.buildView(HandlebarsViewResolver.java:181) ~[handlebars-springmvc-4.2.0.jar:na]
(...)
@galmegiz handlebars-spring-boot-starter do not support spring 3.x. We aren't actively develop this project, but We are open for pr that will provide support for spring 3.x.
Seems that handlebars (handlebars-springmvc) does not support Spring Boot 3 https://github.com/jknack/handlebars.java/issues/1064. This starter uses handlebars-springmvc. We have to wait for Spring Boot 3 support in handlebars-springmvc.
I think handlebars-springmvc now supports SpringBoot 3
Version 0.5.0
was released 🎉 and artifact is available in Maven Central. Please remember the new version requires Spring Boot 3, Spring Framework 6 and Java 17 (and Gradle 7.3).
@jcputney thank you for your contribution 🙏
Does the current version of Handlebars not support Spring boot 3.x? I tried adding Handlebars to my Spring Boot 3.x project but encountered an error. I manually registered the bean, but it also did not work.