Is there a way to use Thymeleaf 2 with Spring Boot 2? - java

Currently I'm upgrading from Spring Boot 1.5 to Spring Boot 2.1.5.
I know the migration guide https://www.thymeleaf.org/doc/articles/thymeleaf3migration.html
But I have some huge Tenant based template in template wrapping mechanism which is strongly relying on IResourceResolver.
As I see here https://github.com/thymeleaf/thymeleaf/issues/419 this topic was refactored completely.
How can I use Spring Boot 2 with the old thymeleaf 2?
We plan a complete frontend rework in a few months, than I would not use thymeleaf anymore. But I have to upgrade to spring boot 2 because auf some spring security topics.

Related

Spring Cloud Sleuth and spring boot 3 and the english language

Sorry for asking that. I'm not an English speaker, and Stackoverflow is the only website I have access to at my work
I need to use Spring Cloud Sleuth in a project currently in spring boot 2, but who will pass to spring boot 3 in a month?
I was reading the Spring Cloud Sleuth documentation and noticed that:
Spring Cloud Sleuth will not work with Spring Boot 3.x onward. The
last major version of Spring Boot that Sleuth will support is 2.x.
https://docs.spring.io/spring-cloud-sleuth/docs/current-SNAPSHOT/reference/html/index.html
Does this mean that the library is not currently compatible with Spring Boot 3 and there is no plan to make it work, or is work being done to make it compatible?
"My coworkers nor I am familiar with the meaning of "onward" in this context. The word does not translate well in my language."
Spring Cloud Sleuth is not planned to work with Spring Boot 3. You must migrate to Micrometer Tracing. Here you can find a link to the migration guide https://github.com/micrometer-metrics/tracing/wiki/Spring-Cloud-Sleuth-3.1-Migration-Guide

Which spring-security version is compatible with Spring 5.2.8.RELEASE?

I have an existing spring mvc project where I'm using spring 4.3.23.RELEASE version with spring security 4.2.13.RELEASE.
Now I want to upgrade the spring version 5.2.8.RELEASE. I don't identify which spring-security version is compatible with Spring 5.2.8.RELEASE version?
Generally speaking, the Spring Security Reference manual will answer this. For example, the manual for the Spring Security 5.2.5 RELEASE says:
Spring Security builds against Spring Framework 5.2.6.RELEASE but should generally work with any newer version of Spring Framework 5.x.
(The next release of Spring Security after 5.2.5 is 5.3.0.)
So I would expect Spring Security 5.2.5 would work with Spring Framework 5.2.8.
The Spring Security Reference manual also advises you to use "spring-framework-bom" to simplify dependency management. The idea is that you select a specific "bom" version and that gives you a set of compatible versions numbers for any of the Spring components that you use.
Spring documentation is the best source, but in case you are still unclear then the following approach can be taken.
As Spring Security depends on Spring Framework, one can look at the dependency tree of Spring Security to identify the compatible version of Spring Framework.
Now this can take some iterations but in the end one would get an accurate result.
Refer to the compile dependencies section in the maven repository page

Spring Data JPA without Spring MVC and Spring Boot

I want to make a small CRUD application using Spring Core and also I want to use Spring Data JPA.
How can I make such application without any web dependency or others like without using Spring MVC and Spring Boot.
Simple Spring Core + Spring Data JPA crud application.
Forget about whether it is recommended or not but is it possible?
Spring Boot is a architecture and it is not a framework. If you want to use Spring Core + Spring Data Jpa without spring-boot then go with maven quickstart.

Migrate Spring application to Spring Boot with Spring Data JPA and Hibernate

I'm working on project, that uses Spring framework (Spring MVC, JDBC etc.) Project is not so big and uses Jetty servlet container, PostgreSQL database with standard DAO classes(sql requests). I need to make it possible to use Spring Boot and Hibernate/Spring JPA with repositories instead SQL queries. I found a few states describes migration to spring boot: https://www.baeldung.com/spring-boot-migration https://3ldn.nl/2016/02/16/spring-boot-in-an-existing-application-part-1/ Now I make small example with Hibernate - generate few Entities and make CRUD operations with Hibernate instead sql queries.
But I need to update existing project for using Spring Boot and I need to use Spring JPA Repositories.
I add spring boot dependencies in dependencyManagment section. What steps I need to do`s next?
I've solved my task and succesfully migrate project to spring boot with JPA/Hibernate.
Its very simple task! and all what you need to migrate is:
0) solve all dependencies issues and remove all tags from boot dependencies.
1) How to use JPA Repositories without Spring Boot
2) How to migrate existing Spring project to Spring Boot
that is all.

Does Spring Framework security 3.2.10 completely supports Thymeleaf 3.0.6

I have a fully developed spring project, I am using spring security version 3.2.10 it is working fine with thymeleaf 2, I want to know whether thymeleaf 3.0.6 supports or fully compatible with spring security 3.2.10 version.
I googled so much but I didn't got answer for my doubt.Please someone help me whether thymeleaf 3.0.6 completely compatible with spring security 3.2.10 and I don't want to change or upgrade the spring security 3.2.10 version.

Categories

Resources