A
A
Alexey Kopendakov2018-06-14 09:55:35
Spring
Alexey Kopendakov, 2018-06-14 09:55:35

What to choose war or fat jar?

Good afternoon.
Help me understand the advantage (if any) of packing in jar over war?
Actually, the whole point is that all the examples that I met in the spring are examples with a built-in server. They, as I see it, have a very big drawback - each "application" requires its own separate port. As for me, this is not convenient.
I understand that when a project is divided into microservices, and they are little interconnected, and each of the microservices should be automatically launched on multiple servers, then this is convenient.
What is the advantage of either approach?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
W
wellusion, 2018-07-07
@wellusion

There is only one difference here - when you have a standalone-priority, it is faster and easier to raise the application on a built-in server. And then put it on the stand. If you intend to have more than one application, or if you need to host it on an already running web server, then you need to build a .war file. However, you can use springboot for development, and then build a war file to host it on the server.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question