Add some documentation about Java 6 compatibility

Document the need to use a different JTA 1.2 API jar and Tomcat 7 or
Jetty 8 if you’re running on Java 6.

Closes gh-2347
pull/2402/head
Andy Wilkinson 10 years ago
parent 49bc12d564
commit f96adaf3ac

@ -36,11 +36,12 @@ diverge from the defaults.
[[getting-started-system-requirements]] [[getting-started-system-requirements]]
== System Requirements == System Requirements
Spring Boot {spring-boot-version} requires http://www.java.com[Java 6] and Spring By default, Spring Boot {spring-boot-version} requires http://www.java.com[Java 7] and
Framework 4.1.3 or above. Explicit build support is provided for Maven (3.2+) and Spring Framework 4.1.3 or above. You can use Spring Boot with Java 6 with some additional
Gradle (1.12+). configuration. See <<howto.adoc#howto-use-java-6>> for more details. Explicit build support
is provided for Maven (3.2+) and Gradle (1.12+).
TIP: Although you can use Spring Boot with Java 6, we generally recommend Java 8 if at TIP: Although you can use Spring Boot with Java 6 or 7, we generally recommend Java 8 if at
all possible. all possible.
=== Servlet containers === Servlet containers

@ -2201,6 +2201,35 @@ after which you can run the application with
[[howto-use-java-6]]
=== How to use Java 6
If you want to use Spring Boot with Java 6 there are a small number of configuration
changes that you will have to make. The exact changes depend on your application's
functionality.
[[howto-use-java-6-embedded-container]]
==== Embedded servlet container compatibility
If you are using one of Boot's embedded Servlet containers you will have to use a
Java 6-compatible container. Both Tomcat 7 and Jetty 8 are Java 6 compatible. See
<<howto-use-tomcat-7>> and <<howto-use-jetty-8>> for details.
[[how-to-use-java-6-jta-api]]
==== JTA API compatibility
While the Java Transaction API itself doesn't require Java 7 the official API jar
contains classes that have been built to require Java 7. If you are using JTA then
you will need to replace the official JTA 1.2 API jar with one that has been built
to work on Java 6. To do so, exclude any transitive dependencies on
`javax.transaction:javax.transaction-api` and replace them with a dependency on
`org.jboss.spec.javax.transaction:jboss-transaction-api_1.2_spec:1.0.0.Final`
[[howto-traditional-deployment]] [[howto-traditional-deployment]]
== Traditional deployment == Traditional deployment
@ -2423,4 +2452,4 @@ but the rest of it is normal for a Spring application in Servlet 2.5. Example:
In this example we are using a single application context (the one created by the context In this example we are using a single application context (the one created by the context
listener) and attaching it to the `DispatcherServlet` using an init parameter. This is listener) and attaching it to the `DispatcherServlet` using an init parameter. This is
normal in a Spring Boot application (you normally only have one application context). normal in a Spring Boot application (you normally only have one application context).
Loading…
Cancel
Save