Deploying Spring Boot to Tomcat 10 produces 404 error [duplicate] - java

We currently have a Spring boot application running on Tomcat 9.
It is using Spring boot version 2.1.5. In order to make my application compatible with Tomcat 10, what should be the Spring boot version?
Will Spring boot be compatible with Tomcat 10(jakarta.* changes)? Or is it still in development?

No version of Spring at this time (neither Spring 5.3.x nor Spring Boot 2.5.x) supports Jakarta EE 9.
According to this issue ticket, you need to wait for Spring 6.x (2022) and Spring Boot 3.x.
Edit: It is official (cf. Spring blog): support for Jakarta EE 9 will be available in Spring Boot 3 and Spring 6, but at the same time they will require Java 17.
Edit2: The first milestone releases (3.0.0-M3 at the time of writing) are available in the Maven repository https://repo.spring.io/ui/native/milestone.

Related

Spring boot 2.6 incompatible with Cloud Sleuth 3.1.4

I'm using Spring Boot 2.6 and Spring Cloud Sleuth 3.1.4
Whenever I run the app I'm getting this:
Your project setup is incompatible with our requirements due to following reasons:
- Spring Boot [2.6.0] is not compatible with this Spring Cloud release train
Action:
Consider applying the following actions:
- Change Spring Boot version to one of the following versions [2.4.x, 2.5.x] .
You can find the latest Spring Boot versions here [https://spring.io/projects/spring-boot#learn].
If you want to learn more about the Spring Cloud Release train compatibility, you can visit this page [https://spring.io/projects/spring-cloud#overview] and check the [Release Trains] section.
If you want to disable this check, just set the property [spring.cloud.compatibility-verifier.enabled=false]
According to release train 2021.0.x should be compatible with Spring boot 2.6 and sleuth 3.1.4 is a part of it.
Am I missing something here?
In the compatibility matrix, as listed here: https://spring.io/projects/spring-cloud, under 'Release Train' section, this should work.
But, I would recommend you to lower the spring cloud version to 3.1.3 to begin with. If you still get the same error, try with version 3.1.0. as in my project I had no problems using spring-cloud-starter-sleuth 3.1.0 with Spring Boot 2.6.x.
Best regards,
Filip
EDIT: With spring sleuth 3.1.4 you should use spring-cloud-dependencies of version 2021.0.4. Maybe here you got the problem.

Apache Wicket with Spring version dependencies

Is there any known version dependencies between Apache Wicket and Spring? Couldn't find any from the Wicket or Wicket-Spring bridge documentation .
For example can Wicket 7 be run with Spring 5, Wicket 9 with Spring 4 and so on.
Wicket 7.x uses Spring 4.1.x - https://github.com/apache/wicket/blob/wicket-7.x/pom.xml#L135
Wicket 8.x uses Spring 4.3.x - https://github.com/apache/wicket/blob/wicket-8.x/pom.xml#L137
Wicket 9.x uses Spring 5.3.x - https://github.com/apache/wicket/blob/wicket-9.x/pom.xml#L174
Wicket 10.x will use Spring 6.x - https://github.com/apache/wicket/blob/80726e2dae60e5893be0621761883f2dec20cac0/pom.xml#L185
You can manage the Spring version in your pom.xml and it may work or not depending on which Spring APIs you use in your application. Wicket's usage of Spring APIs is rather minimal and most probably you won't face problems.

Migrate Elasticsearch 2.4 to higher version along with Spring Framework 4.2.5 to Springboot 2.x. What will be best approach?

I want to upgrade my elasticsearch version & spring framework to Springboot 2.x version. Which elasticsearch & sprinbboot version should be used considering the spring-data-elasticsearch. I'm new to migrating application, would like to know the things that needs to taken into consideration.
I haven't done any Elasticsearch migration before. But 2.4 is the very old version, I guess you need to rewrite the ingestion logic in the migration.
For your reference, we are using the following tech stack in the project:
Spring boot: 2.3.x
AWS Elasticsearch Service: version 7.1
spring-data-elasticsearch 3.2.10

Could using a Spring Boot version based on an incompatible Servlet API version cause problems?

Spring Boot 1.3.0 and above is based on Servlet API versions 3.1.x. However I am using a standalone application server which is based on Servlet 3.0.x. Could this cause a problem, such as Spring Boot attempting to call a method which was introduced in Servlet API 3.1.x and getting a NoSuchMethodError or some other type of LinkageError at runtime? Should I be considering downgrading to Spring Boot version 1.1.12, the last version of Spring Boot to be based on Servlet API 3.0.x?
Section 9.1 of the Spring Boot Reference Guide (for Spring Boot 1.4.1.RELEASE) says
You can also deploy Spring Boot applications to any Servlet 3.0+ compatible container.

Spring-boot and spring-mvc compatibility

When I include spring-boot in my project, it has predefined versions of other spring components. eg: spring-boot 1.3.5 with spring-boot-starter-web automatically includes spring-mvc 4.2.6. if I want to use some features from webmvc 4.3, how can i know they are compatible? is there any compatibility matrix? or should i just treat it as a single release and never change versions?
Spring Boot will work the best for you if you don't try to resist defaults (of course change them only if necessary). You can include Spring 4.3 into Spring boot 1.3.x project, but I guess you will encounter various issues.
Version 1.4.0 will include Spring 4.3. Spring Boot 1.4.0 is on Milestone 3 currently.
BTW,
compatibility version for spring boot
1.5x: https://docs.spring.io/spring-boot/docs/1.5.x/reference/html/appendix-dependency-versions.html
and for spring boot 2.0x:
https://docs.spring.io/spring-boot/docs/2.0.x/reference/html/appendix-dependency-versions.html

Categories

Resources