Skip to content

Commit

Permalink
add starter info
Browse files Browse the repository at this point in the history
  • Loading branch information
dmuelle committed Aug 31, 2023
1 parent 944958f commit 168d344
Show file tree
Hide file tree
Showing 4 changed files with 68 additions and 4 deletions.
9 changes: 5 additions & 4 deletions modules/ROOT/pages/deploy-spring-boot.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

You can enable Open Liberty to support a Spring Boot application. Open Liberty can also configure Spring Boot application arguments and properties and provides tools that optimize the deployment of Spring Boot applications to containers.

To enable Liberty to support a Spring Boot application, add one of the feature:springBoot[display=Spring Boot Support] features to your `server.xml` file. When you deploy a Spring Boot application, Liberty disables the web container that is embedded in the application and uses the Liberty web container instead. You can deploy one Spring Boot application for each server configuration.
To enable Liberty to support a Spring Boot application, add one of the feature:springBoot[display=Spring Boot Support] features to your `server.xml` file. When you deploy a Spring Boot application, Liberty disables the web container that is embedded in the application and uses the Liberty web container instead. You can deploy one Spring Boot application for each server configuration. OPen LIberty supports deploying Spring Boot applications as JAR files or as WAR files.

The examples in the following sections use a sample application that is called `hellospringboot.jar` that is based on the finished application from the link:https://spring.io/guides/gs/spring-boot/[Building an Application with Spring Boot] guide. If you are not familiar with Spring Boot, complete that guide first. The guide includes instructions to build the application as an executable JAR, which is the file format that is used in these examples.

Expand All @@ -38,9 +38,9 @@ server create helloserver
This command creates the `/usr/servers/helloserver/apps` directory.
2. Enable the version of the Open Liberty feature:springBoot[display=Spring Boot Suppor]t feature that your application requires by adding it to the `featureManager` element of the `server.xml` file.
+
- If your application uses Spring Boot 1.5.8, enable the `springBoot-1.5` feature.
- If your application uses Spring Boot 2.0.1, enable the `springBoot-2.0` feature.
- If your application uses Spring Boot 3.x, enable the `springBoot-3.0` feature.
- If your application uses Spring Boot 1.5.8, enable the feature:springBoot-1.5[] feature.
- If your application uses Spring Boot 2.0.1, enable the feature:springBoot-2.0[] feature.
- If your application uses Spring Boot 3.x, enable the feature:springBoot-3.0[] feature.
+
The `hellospringboot.jar` application uses the `spring-boot-starter-web` dependency, which also requires you to enable a feature:servlet[display=Servlet] feature, as shown in the following `server.xml` file example:
+
Expand All @@ -51,6 +51,7 @@ The `hellospringboot.jar` application uses the `spring-boot-starter-web` depende
<feature>servlet-6.0</feature>
</featureManager>
----
For more information about the Open Liberty features that are required to support certain link:https://docs.spring.io/spring-boot/docs/current/reference/htmlsingle/#using.build-systems.starters[Spring Boot Starters], see the feature:springBoot[Spring Boot Support] feature.
3. Copy the `hellospringboot.jar` application into the `/usr/servers/helloserver/apps` directory that the `server create` command created.
4. Configure the application by updating the `server.xml` file.
Expand Down
19 changes: 19 additions & 0 deletions modules/reference/pages/feature/springBoot-1.5/description.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
link:https://docs.spring.io/spring-boot/docs/current/reference/htmlsingle/#using.build-systems.starters[Spring Boot Starters] are a set of convenient dependency descriptors provided by the Spring Boot that you can include in your application. When you use these starters with a Spring Boot application that is deployed on Open Liberty, you might need to enable features beyond the Spring Boot Support feature. The following table lists the Open Liberty features that are required to support certain Spring Boot 1.5 starters.

.Open Liberty features that support Spring Boot 1.5 starters
[%header,cols=2*]
|===

|Spring Boot Starter
|Open Liberty features

|link:https://repo1.maven.org/maven2/org/springframework/boot/spring-boot-starter/1.5.0.RELEASE/spring-boot-starter-1.5.0.RELEASE.pom[spring-boot-starter]
|`springBoot-1.5`

|link:https://repo1.maven.org/maven2/org/springframework/boot/spring-boot-starter-web/1.5.0.RELEASE/spring-boot-starter-web-1.5.0.RELEASE.pom[spring-boot-starter-web]
|`springBoot-1.5` and feature:servlet-3.1[], featureservlet-4.0[], or featurejsp-2.3[]

|link:https://repo1.maven.org/maven2/org/springframework/boot/spring-boot-starter-websocket/1.5.0.RELEASE/spring-boot-starter-websocket-1.5.0.RELEASE.pom[spring-boot-starter-websocket]
|`springBoot-1.5` and feature:websocket-1.0[] or feature:websocket-1.1[]

|===
22 changes: 22 additions & 0 deletions modules/reference/pages/feature/springBoot-2.0/description.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
link:https://docs.spring.io/spring-boot/docs/current/reference/htmlsingle/#using.build-systems.starters[Spring Boot Starters] are a set of convenient dependency descriptors provided by the Spring Boot that you can include in your application. When you use these starters with a Spring Boot application that is deployed on Open Liberty, you might need to enable features beyond the Spring Boot Support feature. The following table lists the Open Liberty features that are required to support certain Spring Boot 2.0 starters.

.Open Liberty features that support Spring Boot 2.0 starters
[%header,cols=2*]
|===

|Spring Boot Starter
|Open Liberty features

|link:https://repo1.maven.org/maven2/org/springframework/boot/spring-boot-starter/2.0.0.RELEASE/spring-boot-starter-2.0.0.RELEASE.pom[spring-boot-starter]
|`springBoot-2.0`

|link:https://repo1.maven.org/maven2/org/springframework/boot/spring-boot-starter-web/1.5.0.RELEASE/spring-boot-starter-web-1.5.0.RELEASE.pom[spring-boot-starter-web]
|`springBoot-2.0` and feature:servlet-3.1[], featureservlet-4.0[], or featurejsp-2.3[]

|link:https://repo1.maven.org/maven2/org/springframework/boot/spring-boot-starter-websocket/1.5.0.RELEASE/spring-boot-starter-websocket-1.5.0.RELEASE.pom[spring-boot-starter-websocket]
|`springBoot-2.0` and feature:websocket-1.0[] or feature:websocket-1.1[]

|link:https://repo1.maven.org/maven2/org/springframework/boot/spring-boot-starter-webflux/2.0.1.RELEASE/spring-boot-starter-webflux-2.0.1.RELEASE.pom[spring-boot-starter-webflux]
|`springBoot-2.0` and `servlet-3.1`, `servlet-4.0`, or `jsp-2.3`

|===
22 changes: 22 additions & 0 deletions modules/reference/pages/feature/springBoot-3.0/description.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
link:https://docs.spring.io/spring-boot/docs/current/reference/htmlsingle/#using.build-systems.starters[Spring Boot Starters] are a set of convenient dependency descriptors provided by the Spring Boot that you can include in your application. When you use these starters with a Spring Boot application that is deployed on Open Liberty, you might need to enable features beyond the Spring Boot Support feature. The following table lists the Open Liberty features that are required to support certain Spring Boot 3.0 starters.

.Open Liberty features that support Spring Boot 3.0 starters
[%header,cols=2*]
|===

|Spring Boot Starter
|Open Liberty features

|link:https://repo1.maven.org/maven2/org/springframework/boot/spring-boot-starter/3.0.0/spring-boot-starter-3.0.0.pom[spring-boot-starter]
|`springBoot-3.0`

|link:https://repo1.maven.org/maven2/org/springframework/boot/spring-boot-starter-web/3.0.0/spring-boot-starter-web-3.0.0.pom[spring-boot-starter-web]
|`springBoot-3.0` and feature:servlet-6.0[], featureservlet-6.1[], or featurejsp-2.3[]

|link:https://repo1.maven.org/maven2/org/springframework/boot/spring-boot-starter-websocket/3.0.0/spring-boot-starter-websocket-3.0.0.pom[spring-boot-starter-websocket]
|`springBoot-3.0` and feature:websocket-2.0[]

|link:https://repo1.maven.org/maven2/org/springframework/boot/spring-boot-starter-webflux/3.0.0/spring-boot-starter-webflux-3.0.0.pom[spring-boot-starter-webflux]
|`springBoot-3.0` and feature:servlet-6.0[], featureservlet-6.1[], or featurejsp-2.3[]

|===

0 comments on commit 168d344

Please sign in to comment.