Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add thymeleaf-spring6 #268

Draft
wants to merge 1 commit into
base: 3.0-master
Choose a base branch
from
Draft

Add thymeleaf-spring6 #268

wants to merge 1 commit into from

Conversation

rwinch
Copy link
Contributor

@rwinch rwinch commented Dec 5, 2021

Add preliminary support for Spring Framework 6 which requires Jakarta EE. This PR is dependent on thymeleaf/thymeleaf#856

@@ -0,0 +1,34 @@

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As with the PR for the thymeleaf code module, please note that Thymeleaf now is in 3.0.14.RELEASE and there is a new 3.1-dev branch which this should be rebased on.

Also note that 3.0.14.RELEASE includes some changes related to restricted mode detection checks that might have made these preliminary classes in the new thymeleaf-spring6 module outdated.

@@ -0,0 +1,62 @@
/*
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I understand there are still changes to be made to packages here .thymeleaf.spring5. -> .thymeleaf.spring6. -> and also imports on org.thymeleaf.spring5.* classes, right?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Correct.

import java.util.Optional;
import java.util.TimeZone;

import jakarta.servlet.http.HttpServletRequest;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See how, in the whole code submitted here for the new thymeleaf-spring6 module, there are only two instances of imports on jakarta.* classes. This kind of makes me think that the effect on code complexity of performing the org.thymeleaf.web.servlet.* generalisation I mentioned for the core module might not be that bad…

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are you thinking we would try to have the same code base between spring 5 and 6? Having the same code base for Spring 5 & 6 seems to deviate from the pattern that is currently established and I think it would likely end up making things difficult to maintain.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No no, I didn't mean that. I believe these should still be different modules. I was just reflecting on the fact that, after all, use of native javax.servlet characteristics is not very extense in these modules, so the abstraction of these entities would not really bring a lot of changes to them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants