Spring boot embedded container or war file in an external container for production

后端 未结 5 1156
梦毁少年i
梦毁少年i 2020-12-28 15:13

I\'m complete able to configure spring boot in both cases, the question here is which of them are more robust and is the more recommended, because I didn\'t find in the spri

5条回答
  •  南方客
    南方客 (楼主)
    2020-12-28 15:40

    jar packaging is perfectly suitable for production and you should rather fallback to war only if you really have to - which is often the case when you cannot control your deployment environment (which is often the case in large enterprises).

    There is a chapter in Spring Boot Reference about setting up Spring Boot based application as a Unix/Linux/Windows service: Installing Spring Boot applications.

    Regarding your concern:

    Maybe in the future I need more applications in the same container.

    With embedded containers if you need more applications running on the same machine, you should start two applications separately, each running on different port and effectively you will end up with two containers running - which is good, applications are better isolated from each other.

提交回复
热议问题