官术网_书友最值得收藏!

Fat JAR approach

The idea of creating a Fat JAR (all-inclusive JAR), is to allow us to have a single deployable unit that has all the application and runtime code in it. Thus, instead of deploying your application to an application server, you bundle everything needed to run your application into a JAR file, which includes an embedded server. This single artifact can then be promoted through your various environments, such as the test stage, till production.

Here’s the logical view for a Fat JAR based deployment with bundled server runtime/libs:

There already exist new frameworks that make it fairly easy to get started with microservices. We will look at two popular choices, WildFly Swarm and Spring Boot. WildFly Swarm is based on the WildFly application server, while Spring Boot is a popular choice among developers.

Both Spring Boot and WildFly Swarm allow us to build Uber JARs that are self-contained and have a small memory footprint, as they pack only the essentials of what the application needs. Both of these projects provide good support for developing microservices by means of third party library integrations such as Netflix OSS, which is a set of frameworks and libraries for building microservice applications.

Other noteworthy mentions include DropWizard, which also offers a similar approach to building an Uber JAR. We will see examples of WildFly Swarm and Spring Boot in the sections to follow.

主站蜘蛛池模板: 灌阳县| 深水埗区| 桃源县| 兴化市| 嘉祥县| 泗洪县| 高清| 内江市| 孟州市| 抚顺市| 三都| 宁南县| 池州市| 子洲县| 安宁市| 高平市| 三台县| 宁蒗| 象山县| 剑阁县| 禄丰县| 二连浩特市| 永安市| 福建省| 连州市| 疏勒县| 德化县| 峡江县| 竹北市| 清徐县| 潮安县| 安陆市| 城固县| 黑水县| 广宁县| 平乐县| 高淳县| 肇源县| 大安市| 报价| 娄烦县|