1
1
.
.
3
3
.
.
2
2
D
D
e
e
p
p
l
l
o
o
y
y
I
I
n
n
f
f
o
o
[
[
R
R
]
]
This tutorial shows how to deploy Spring Boot Application by creating Fat Jar.
Fat Jar will include everything needed for the application to run (including Tomcat Server).
You can then simply copy Fat Jar (using FTP) to target Server (with Java installed) and start it with Java.
To demonstrate how this works first create simple Spring Boot Application as shown in Return - Text and then
Maven Run Configuration - Create clean install
Maven Run Configuration - Run creates springboot_testfatjar-0.0.1-SNAPSHOT.jar
Run Fat Jar java -jar myfatapp.jar
Results http://localhost:8085/hello
M
M
a
a
v
v
e
e
n
n
R
R
u
u
n
n
C
C
o
o
n
n
f
f
i
i
g
g
u
u
r
r
a
a
t
t
i
i
o
o
n
n
-
-
C
C
r
r
e
e
a
a
t
t
e
e
Run
Edit Configurations
Add New Configuration
Maven
Working Directory: C:/Projects/springboot_testfatjar
Command line: clean install
OK
Run - Edit Configurations
Add New Configuration - Maven
Command line: clean install
M
M
a
a
v
v
e
e
n
n
R
R
u
u
n
n
C
C
o
o
n
n
f
f
i
i
g
g
u
u
r
r
a
a
t
t
i
i
o
o
n
n
-
-
R
R
u
u
n
n
Select Maven Run Configuration: springboot_testfatjar [clean,install]
Run (creates springboot_testfatjar-0.0.1-SNAPSHOT.jar)
R
R
u
u
n
n
F
F
a
a
t
t
J
J
a
a
r
r
Start Command Prompt
(execute below commands)
Command Prompt
cd C:\Projects\springboot_testfatjar\target
java -jar springboot_testfatjar-0.0.1-SNAPSHOT.jar
R
R
e
e
s
s
u
u
l
l
t
t
s
s
Command Prompt
Command Prompt Output
Hello from SpringbootTestfatjar
Tomcat initialized with port(s): 8085 (http)
http://localhost:8085/hello