Any issues migrating from JDK6 to JDK7 using Spring & Tomcat?

I would like to take advantage of some of the features of JDK7. What problems can I solve given that I am using Apache Tomcat 7.0.x (last) and Spring 3.1 (last)?

+6
source share
3 answers

There were several compilations in which JDK 6 could infer a typical type where JDK 7 could not. This was apparently a bug in JDK 6 as a reference here .

If you use container-specific resources (such as data sources, etc.), make sure that they still work correctly (although this will be immediately apparent when starting Spring, if any of them are connected).

If you are using Spring Security and you are updating, you do not need to make any changes for yourself to get the job done. However, you should use their less detailed configuration options (especially for REST URLs), which are available in Spring Security 3.1.

In addition, our update was smooth.

+2
source

With the latest update to Ubuntu (11.10), I switched to JDK 7 (OpenJDK 1.7.0_147). I use Spring 3.0, Tomcat 6, and JRE 6 on the server (we have both virtual and β€œphysical” server installations). Code compiled using JDK 7 runs in this configuration without any problems. I am sure that the transition to Spring 3.1 will not lead to any changes. Not so sure about Tomcat 7, but hopefully this information will be useful to you.

+1
source

You may have a problem if you use Java 7 features in JSP . Tomcat is the default Java 1.6 user to compile JSP. See http://tomcat.apache.org/tomcat-7.0-doc/jasper-howto.html#Production%20Configuration

To solve this problem, you want to override the compilerSourceVM and compilerSourceVM init parameters in your web.xml application. Read more about it here: fooobar.com/questions/899344 / ...

0
source

Source: https://habr.com/ru/post/899343/


All Articles