File tree Expand file tree Collapse file tree 3 files changed +20
-20
lines changed
spring-boot-with-open-liberty Expand file tree Collapse file tree 3 files changed +20
-20
lines changed Original file line number Diff line number Diff line change
1
+ FROM open-liberty:kernel
2
+ COPY server.xml /config/
3
+ COPY target/spring-boot-with-open-liberty.jar /config/apps/
Original file line number Diff line number Diff line change @@ -5,23 +5,7 @@ Steps to run this project:
5
5
1 . Clone this Git repository
6
6
2 . Navigate to the folder ` spring-boot-with-open-liberty `
7
7
3 . Build the project with ` mvn clean package `
8
- 4 . Download the latest Open Liberty (at least 18.0.0.2) from https://openliberty.io/downloads/ and extract the zip
9
- 5 . Navigate to the ` wlp ` folder you extracted and run ` bin/server start defaultServer ` or ` bin/server.bat start defaultServer ` for Windows
10
- 6 . Open the ` server.xml ` file in ` wlp/usr/server/defaultServer ` and replace the content with the following configuration:
11
- ```
12
- <?xml version="1.0" encoding="UTF-8"?>
13
- <server description="new server">
14
- <featureManager>
15
- <feature>springBoot-2.0</feature>
16
- <feature>servlet-4.0</feature>
17
- <feature>websocket-1.1</feature>
18
- </featureManager>
19
- <httpEndpoint id="defaultHttpEndpoint"
20
- httpPort="9080"
21
- httpsPort="9443" />
22
- <applicationManager autoExpand="true"/>
23
- <springBootApplication location="spring-boot-with-open-liberty.jar"/>
24
- </server>
25
- ```
26
- 7 . Copy the already built (step 3.) ` spring-boot-with-open-liberty.jar ` to ` wlp/usr/server/defaultServer/apps `
27
- 8 . Visit ` http://localhost:9080 ` for chatting and ` http://localhost:9080/api/messages ` to get all chat messages
8
+ 4 . Start your Docker daemon
9
+ 5 . Run ` docker build -t spring-liberty . `
10
+ 6 . Run ` docker run -p 9080:9080 spring-liberty ` and wait until the applications successfully booted
11
+ 7 . Visit ` http://localhost:9080 ` for chatting and ` http://localhost:9080/api/messages ` to get all chat messages
Original file line number Diff line number Diff line change
1
+ <?xml version =" 1.0" encoding =" UTF-8" ?>
2
+ <server description =" new server" >
3
+ <featureManager >
4
+ <feature >springBoot-2.0</feature >
5
+ <feature >servlet-4.0</feature >
6
+ <feature >websocket-1.1</feature >
7
+ </featureManager >
8
+ <httpEndpoint id =" defaultHttpEndpoint"
9
+ httpPort =" 9080"
10
+ httpsPort =" 9443" />
11
+ <applicationManager autoExpand =" true" />
12
+ <springBootApplication location =" spring-boot-with-open-liberty.jar" />
13
+ </server >
You can’t perform that action at this time.
0 commit comments