Closed thombergs closed 1 year ago
Hi Tom, thanks for informing me about this! I'll look into it later, but it won't be in the first coming weeks I am afraid.
@thombergs That sounds like we won't be able to support both Spring 5 and Spring 6 at the same time. Right?
@thombergs I just pushed the branch spring-6-boot-3. If you build that locally using mvn install
, then you could test it locally.
The version number has been set to 2.0.0-SNAPSHOT
for now. I would use 1.x
for Spring 5 versions and 2.x
for Spring 6 versions.
Heads up the the spring.factories
config changed in Spring 3: https://github.com/spring-projects/spring-boot/wiki/Spring-Boot-3.0.0-M5-Release-Notes#auto-configuration-registration
Do you think we can have this rolled into a 2.0 M1 pretty soon? I have a lecture at Tu Dresden next week and would like to use this in a sample built on Spring Boot 3.
Having snapshots deployed would help as well.
@odrotbohm I will try to have a version this morning, but I am unable to fix the change away from spring.factories
. I had this before:
org.springframework.boot.autoconfigure.EnableAutoConfiguration=\
io.github.wimdeblauwe.hsbt.thymeleaf.HtmxThymeleafConfiguration,\
io.github.wimdeblauwe.hsbt.mvc.HtmxMvcConfiguration
org.springframework.boot.test.autoconfigure.web.servlet.AutoConfigureMockMvc=\
io.github.wimdeblauwe.hsbt.thymeleaf.HtmxThymeleafConfiguration,\
io.github.wimdeblauwe.hsbt.mvc.HtmxMvcConfiguration
Which enabled the autoconfiguration on tests that use MockMvc (e.g. @WebMvcTest
). How can I have this again in the new system?
Never mind, just found it. I need to create a separate org.springframework.boot.test.autoconfigure.web.servlet.AutoConfigureMockMvc.imports
file now.
The wording in the release notes is a bit confusing:
If you have created your own test-slices, you should move the registration from spring.factories to the new place under META-INF/spring/
.imports.
I am not creating my own test-slices, I am configuring extra classes on existing test slices like @WebMvcTest
.
@thombergs @odrotbohm You should be able to use version 2.0.0-M1 now with Spring Boot 3.0.0-M5: https://github.com/wimdeblauwe/htmx-spring-boot-thymeleaf/releases/tag/2.0.0-M1
Th legacy auto-configuration format was removed in 3.0 M5. The release notes for 3.0 are a bit cluttered right now as we want folks to see what has changed for individual milestones until the GA release. After that, they'll be consolidated into a single document and the change is likely to be easier to find.
Thanks for the release, Wim!
I was trying out this library with the current Spring Boot 3 milestone and got this error. The reason is that the library uses imports from
org.thymeleaf.spring5
and these don't exist as a dependency in Spring Boot 3 anymore. Instead, the imports should be made fromorg.thymeleaf.spring6
.