What is the meaning of "Full Servlet 3.1 signature support in Spring-provided Filter implementations" in Spring 5 new features? - spring

Spring 5 brings "Full Servlet 3.1 signature support in Spring-provided Filter implementations" according to The "What's New in Spring 5"
But what does this feature mean? Is there any new Servlet 3.1 signature support added in spring 5?

You can get a hint of what this means from some issues from Spring JIRA like the one here and here. Basically the Spring filter implementation ( typically used in Spring security) obviously used ServletRequest/ServletResponse parameters in doFilter method which were not fully Servlet 3.1 API compliant. With Spring version 5 the support has been complete in contrast to previous version where it was incremental ( or as a bug fix)

Related

Use of Spring 5.3 with Servlet 3.0

I'm working on application which uses Spring Core in version 4.3.14 and Spring Web in version 4.2.13. We don't use Spring MVC. Also, from Spring Web we use just very limited set of classes:
XmlWebApplicationContext (so classes from org.springframework.web.context)
RestTemplate (so classes from org.springframework.web.client, here i expect some problems)
some util classes which probably can be refactored to use something else
My question is:
We want to migrate to Spring 5.x. Is such a migration really possible? Or should i expect some severe problems with application startup (class incompatibilites etc). This source for example: https://github.com/spring-projects/spring-framework/wiki/What%27s-New-in-Spring-Framework-5.x#whats-new-in-version-50 says that Servlet 3.1 is required
From the other side, here https://spring.io/blog/2015/06/10/feedback-welcome-spring-5-system-requirements JUERGEN HOELLER wrote that migration to Spring 5 will be a soft one. So i assume that if Application uses only features from JEE6 + Servlet 3.0, then it can be that it will also work on Spring 5.x with JEE6-compatible appserver
Does anyone have an experience in that?
As always, Spring Framework upgrades its baseline with new major versions. In this case, we're requiring JDK8+ and Java EE7+.
In practice, this means that the compiled code depends on those APIs and doesn't use reflection anymore to adapt to them. In your case, this is not only about Servlet, but also JPA, JMS, bean validation and other specs.
Your application might work fine with the arrangement you're mentioning, but the Spring team will not guarantee support for this setup.

Does Spring 3.x is still legitimately good for new learners in comparison with 4.x and 5.x versions?

Does Spring 3.x is still legitimately good for new learners in comparison with 4.x and 5.x versions? And does it still covers the most of spring fundamentals? And on high level what one has missed, if he didn't touched the 4.x and 5.x ?
Does Spring 3.x is still legitimately good for new learners in comparison with 4.x and 5.x versions?
No, because you would be learning old ways of implementing for example JSR.
Here are some difference between spring 3 and spring 4.
*RestController annotation
*JSR-335 Lambda expressions
*JSR-310 Date-Time value types for Spring data binding and formatting.
*JSR-343 JMS 2.0.
*JSR-338 JPA 2.1.
*JSR-349 Bean Validation 1.1.
*JSR-236 Java EE 7 Enterprise Concurrency support.
*JSR-356 Spring’s WebSocket endpoint mode.
*Configuring and implementing Spring style application using Groovy 2. Also they specify that first class support for the Groovy applications.
*Also spring plans to add the HATEOS (Hypermedia as the Engine of Application State) support for REST APIs.
Also Spring 4 is the minimum requirement for running spring boot applications.
And does it still covers the most of spring fundamentals?
Yes, you can get a great introduction with Spring framework and MVC approach, but that is also covered in spring 5 courses as well.
And on high level what one has missed, if he didn't touch the 4.x and 5.x ?
Consider the difference between 3 and 4 on top and to add the difference between spring 4 and 5
*JDK baseline update.
*Core framework revision.
*Core container updates.
*Functional programming with Kotlin.
*Reactive Programming Model.
*Testing improvements.
*Library support.
*Discontinued support.

Spring Boot with Thymeleaf 3 using OGNL or SpEL or a mix?

I am using Spring Boot 1.4 with Thymeleaf 3.
What syntax is used? OGNL or SpEL?
Appendix A lists no Thymeleaf parameter to configure.
If you are using the spring-boot-starter-thymeleaf it configures automatically the integration of Thymeleaf with Spring, using the SpringTemplateEngine and the SpringStandardDialect.
That means the active variable expression language is SpEL. It also provides other integration features. The links point to the 2.1 version documentation, but I think it's the same in the 3.0 version.

Will Spring 4.1 support JSF 2.2?

Some time ago I heard a rumor saying Spring 4.1 is going to support JSF 2.2. In particular, SpringBeanFacesELResolver would be able to create view scoped controller beans. Spring 3 only supports application scope, request scope and session scope. As far as I know Spring 4.0 supports the same scopes.
Unfortunately, I don't find the reference on Spring 4.1 and JSF 2.2 (except my own web site, where I mention I had heard the rumor). Are there any plans concerning Spring 4.1 and JSF 2.2?
BTW: I know there are several questions on StackOverflow dealing with Spring and JSF. My question is different in that it's specifically about Spring 4.1 and it's about native Spring support. In particular, it's not about how to implement ViewScope myself.
Rafael Ponte told me today #ViewScope can be used with the latest Spring 3.2 version. See the full story (including Rafaels comments) at my blog.
As for Spring 4.1: the plans to support JSF 2.2 have been dropped. The JIRA issue on the topic has been moved to "contribution welcome" - in other words they're waiting for us to implement it ourselves and to submit our solution to the Spring team.

Can we integrate Struts 2.0 with Spring 3.0 +

I am new to Struts . Can we integrate Struts 2.0 with Spring 3.0 + . I am hearing people say "it is not possible to integrate it". Is this true .
If so is there any tutorial on the web having an example ?
edit :
There is a plugin to integrate Struts 2 and Spring 2 (struts2-spring-plugin-2.0.11.2.jar) . Do we have similar one for Struts 2 and Spring 3
Well we always can use Spring 3.x with Struts 2.x and Struts2.x has already a plug in in place to accomplish this.
here is the link Struts2 spring Integration
Struts2 use its internal DI for creation of Actions,Results,Interceptor using the plug in will delegate the call of creation of these key objects to Spring DI.
hope this will help you
edit
The Strus2 Spring Plug in works well even with Spring 3.x and we are using this in our current application it actually use your Spring jars and you have to place them in the lib.This plug in just overrides Struts2.x Object factory which is responsible for creating struts2 core component.
So just go ahead do some experiment with it and if you face problem in integrating you can always post queries here
The Spring 3.0 documentation for Struts 1.x and 2.x is here.
It's technically possible to integrate Spring with really just about anything. For example you can use the IoC container from anywhere in your code by constructing a new ClassPathXmlApplicationContext and passing in a standard context XML resource on the classpath. There's generally not a need to do that though, as it integrates pretty well with most web frameworks. It is however convenient to use for unit tests.

Resources