{"id":302001,"date":"2020-04-16T15:01:10","date_gmt":"2020-04-16T15:01:10","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=302001"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=302001","title":{"rendered":"\u041a\u0430\u043a Quarkus \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u044f\u0435\u0442 MicroProfile \u0438 Spring"},"content":{"rendered":"\n<div class=\"post__text post__text-html post__text_v1\" id=\"post-content-body\" data-io-article-url=\"https:\/\/habr.com\/ru\/company\/redhatrussia\/blog\/497504\/\">\u0412\u0441\u0435\u043c \u043f\u0440\u0438\u0432\u0435\u0442, \u0438 \u0441 \u0432\u0430\u043c\u0438 \u0442\u0440\u0435\u0442\u0438\u0439 \u043f\u043e\u0441\u0442 \u0438\u0437 \u0441\u0435\u0440\u0438\u0438 \u043f\u0440\u043e Quarkus!<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/po\/ux\/ir\/pouxirwqx8fafftuhwwcma0jw5q.jpeg\" width=\"100%\"><\/p>\n<p>  \u041f\u0440\u0438 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0435 Java-\u043c\u0438\u043a\u0440\u043e\u0441\u0435\u0440\u0432\u0438\u0441\u043e\u0432 \u0447\u0430\u0441\u0442\u043e \u0441\u0447\u0438\u0442\u0430\u0435\u0442\u0441\u044f, \u0447\u0442\u043e <a href=\"https:\/\/developers.redhat.com\/blog\/2019\/02\/28\/jumpstart-microservices-microprofile-starter-beta\/\">Eclipse MicroProfile<\/a> \u0438 <a href=\"https:\/\/developers.redhat.com\/topics\/spring-boot\/\">Spring Boot<\/a> \u2013 \u044d\u0442\u043e \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0435 \u0438 \u043d\u0435\u0437\u0430\u0432\u0438\u0441\u0438\u043c\u044b\u0435 \u0434\u0440\u0443\u0433 \u043e\u0442 \u0434\u0440\u0443\u0433\u0430 API. \u041f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e, \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0441\u0442\u044b, \u043a\u0430\u043a \u043f\u0440\u0430\u0432\u0438\u043b\u043e, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442 \u0442\u0435 API, \u043a \u043a\u043e\u0442\u043e\u0440\u044b\u043c \u043e\u043d\u0438 \u0443\u0436\u0435 \u043f\u0440\u0438\u0432\u044b\u043a\u043b\u0438, \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u0438\u0437\u0443\u0447\u0435\u043d\u0438\u0435 \u043d\u043e\u0432\u044b\u0445 \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u043e\u0432 \u0438 runtime-\u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043e\u0432 \u0442\u0440\u0435\u0431\u0443\u0435\u0442 \u043c\u043d\u043e\u0433\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438. \u0421\u0435\u0433\u043e\u0434\u043d\u044f \u043c\u044b \u043f\u043e\u043f\u0440\u043e\u0431\u0443\u0435\u043c \u0443\u043f\u0440\u043e\u0441\u0442\u0438\u0442\u044c \u043e\u0441\u0432\u043e\u0435\u043d\u0438\u0435 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u044b\u0445 <a href=\"https:\/\/developers.redhat.com\/blog\/2018\/11\/21\/eclipse-microprofile-for-spring-boot-developers\/\">MicroProfile API \u0434\u043b\u044f Spring-\u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u043e\u0432<\/a> \u0438 \u043f\u043e\u043a\u0430\u0436\u0435\u043c, \u043a\u0430\u043a \u043e\u0434\u043d\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e \u0437\u0430\u0434\u0435\u0439\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c Spring API \u0438 \u043d\u043e\u0432\u044b\u0435 \u043f\u043e\u043b\u0435\u0437\u043d\u044b\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 <a href=\"https:\/\/quarkus.io\/\">Quarkus<\/a>.<br \/>  <a name=\"habracut\"><\/a><br \/>  \u0415\u0441\u043b\u0438 \u0447\u0443\u0442\u044c \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435, \u0442\u043e \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u043c\u044b \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043e\u0431\u043b\u0430\u0441\u0442\u044c \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0438 \u0434\u0435\u0442\u0430\u043b\u0438 \u0442\u043e\u0433\u043e, \u043a\u0430\u043a Quarkus \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 API-\u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u044b Spring, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u044c Spring-\u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430\u043c, \u043a\u0430\u043a \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0442\u044c MicroProfile API \u0432 \u0441\u0432\u043e\u0435\u0439 \u043f\u043e\u0432\u0441\u0435\u0434\u043d\u0435\u0432\u043d\u043e\u0439 \u0440\u0430\u0431\u043e\u0442\u0435. \u0417\u0430\u0442\u0435\u043c \u043c\u044b \u0440\u0430\u0441\u0441\u043a\u0430\u0436\u0435\u043c \u043e MicroProfile API, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u0440\u0438\u0433\u043e\u0434\u044f\u0442\u0441\u044f Spring-\u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430\u043c \u043f\u0440\u0438 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0438 \u043c\u0438\u043a\u0440\u043e\u0441\u0435\u0440\u0432\u0438\u0441\u043e\u0432.<\/p>\n<p>  \u041f\u043e\u0447\u0435\u043c\u0443 \u0438\u043c\u0435\u043d\u043d\u043e Quarkus? \u0412\u043e-\u043f\u0435\u0440\u0432\u044b\u0445, \u044d\u0442\u043e \u043a\u043e\u0434\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0432\u0436\u0438\u0432\u0443\u044e (live coding), \u0442\u043e \u0435\u0441\u0442\u044c \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u043f\u0435\u0440\u0435\u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0430 \u043b\u044e\u0431\u044b\u0445 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439 \u0432 MicroProfile API, Spring API \u0438 \u0434\u0440\u0443\u0433\u0438\u0445 Java API, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \u0432\u0441\u0435\u0433\u043e \u043e\u0434\u043d\u043e\u0439 \u043a\u043e\u043c\u0430\u043d\u0434\u043e\u0439: mvn quarkus:dev. \u0412\u043e-\u0432\u0442\u043e\u0440\u044b\u0445, \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0435\u043c\u044b\u0439 \u0432 <a href=\"https:\/\/github.com\/jclingan\/quarkus-spring-microprofile\">\u043d\u0430\u0448\u0435\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435<\/a> \u0441\u0435\u0440\u0432\u0438\u0441 Person (\u043e\u043d \u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u0438\u0437 API-\u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u043e\u0432 Spring, MicroProfile \u0438 JPA \u0432 \u0434\u0432\u043e\u0438\u0447\u043d\u044b\u0439 \u0444\u0430\u0439\u043b \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u043d\u0430\u0442\u0438\u0432\u043d\u043e\u0433\u043e \u043e\u0431\u0440\u0430\u0437\u0430 GraalVM) \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442\u0441\u044f \u0432\u0441\u0435\u0433\u043e \u0437\u0430 0.055 \u0441\u0435\u043a\u0443\u043d\u0434\u044b \u0438 \u0437\u0430\u043d\u0438\u043c\u0430\u0435\u0442 \u043e\u043a\u043e\u043b\u043e 90 \u041c\u0411 \u0432 \u043e\u043f\u0435\u0440\u0430\u0442\u0438\u0432\u043d\u043e\u0439 \u043f\u0430\u043c\u044f\u0442\u0438 (RSS) \u043d\u0430 \u043a\u043e\u043d\u0435\u0447\u043d\u043e\u0439 \u0442\u043e\u0447\u043a\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f RESTful. \u041f\u0440\u0438\u0447\u0435\u043c \u0441\u0430\u043c\u0430 \u0435\u0433\u043e \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \u0432\u0441\u0435\u0433\u043e \u043e\u0434\u043d\u043e\u0439 \u043a\u043e\u043c\u0430\u043d\u0434\u043e\u0439: mvn package -Pnative.<\/p>\n<p>  \u041c\u044b \u043d\u0435 \u0431\u0443\u0434\u0435\u043c \u0443\u0433\u043b\u0443\u0431\u043b\u044f\u0442\u044c\u0441\u044f \u0432 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e\u0441\u0442\u0438 MicroProfile, \u0430 \u043b\u0438\u0448\u044c \u043f\u043e\u0441\u0442\u0430\u0440\u0430\u0435\u043c\u0441\u044f \u043f\u043e\u043c\u043e\u0447\u044c Spring-\u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430\u043c \u043f\u043e\u043d\u044f\u0442\u044c, \u043a\u0430\u043a \u0432 Quarkus \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c API-\u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u044b Spring \u0432\u043c\u0435\u0441\u0442\u0435 \u0441 API-\u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430\u043c\u0438 MicroProfile.<\/p>\n<h3>\u041a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u044b \u0438 Kubernetes<\/h3>\n<p>  \u0427\u0442\u043e\u0431\u044b \u043d\u0435 \u043f\u0435\u0440\u0435\u0433\u0440\u0443\u0436\u0430\u0442\u044c \u044d\u0442\u0443 \u0441\u0442\u0430\u0442\u044c\u044e, \u043c\u044b \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0437\u0434\u0435\u0441\u044c \u043b\u0438\u0448\u044c \u0432\u044b\u0441\u043e\u043a\u043e\u0443\u0440\u043e\u0432\u043d\u0435\u0432\u044b\u0435 \u0430\u0441\u043f\u0435\u043a\u0442\u044b \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0438 <a href=\"https:\/\/developers.redhat.com\/developer-tools\/kubernetes\">Kubernetes<\/a>, \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u044d\u0442\u043e \u0432\u0430\u0436\u043d\u043e \u043f\u043e\u043d\u0438\u043c\u0430\u0442\u044c. Quarkus \u043f\u043e\u0437\u0438\u0446\u0438\u043e\u043d\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u043a\u0430\u043a Java-\u0441\u0442\u0435\u043a \u0434\u043b\u044f Kubernetes, \u043e\u043d \u043f\u0440\u0438\u0437\u0432\u0430\u043d \u043c\u0438\u043d\u0438\u043c\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0440\u0430\u0441\u0445\u043e\u0434 \u043f\u0430\u043c\u044f\u0442\u0438 \u0438 \u0432\u0440\u0435\u043c\u044f \u0437\u0430\u043f\u0443\u0441\u043a\u0430 Java-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439 \u0438 \u0441\u0435\u0440\u0432\u0438\u0441\u043e\u0432, \u0438, \u043a\u0430\u043a \u0441\u043b\u0435\u0434\u0441\u0442\u0432\u0438\u0435, \u043f\u043e\u0432\u044b\u0441\u0438\u0442\u044c \u043f\u043b\u043e\u0442\u043d\u043e\u0441\u0442\u044c \u0438\u0445 \u0440\u0430\u0437\u043c\u0435\u0449\u0435\u043d\u0438\u044f \u043d\u0430 \u0445\u043e\u0441\u0442\u0435 \u0438 \u0441\u043d\u0438\u0437\u0438\u0442\u044c \u043e\u0431\u0449\u0438\u0435 \u0437\u0430\u0442\u0440\u0430\u0442\u044b.<\/p>\n<p>  Quarkus \u0442\u0430\u043a\u0436\u0435 <a href=\"https:\/\/quarkus.io\/guides\/kubernetes-resources\">\u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 \u0430\u0432\u0442\u043e\u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u044e<\/a> \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432 Kubernetes \u0438 \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u0435\u0442 <a href=\"https:\/\/quarkus.io\/guides\/\">\u0440\u0443\u043a\u043e\u0432\u043e\u0434\u0441\u0442\u0432\u0430<\/a> \u043f\u043e \u0440\u0430\u0437\u0432\u0435\u0440\u0442\u044b\u0432\u0430\u043d\u0438\u044e \u043d\u0430 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430\u0445 Kubernetes \u0438 Red Hat OpenShift. \u041a\u0440\u043e\u043c\u0435 \u0442\u043e\u0433\u043e, Quarkus \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u0442 \u0444\u0430\u0439\u043b\u044b Dockerfile.jvm (JVM packaging) \u0438 Dockerfile.native (native binary packaging), \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u043e\u0432.<\/p>\n<p>  \u0418 \u043d\u0430\u043a\u043e\u043d\u0435\u0446, \u043e\u0440\u0438\u0435\u043d\u0442\u0438\u0440\u0443\u044f\u0441\u044c \u043d\u0430 Kubernetes \u043a\u0430\u043a \u043d\u0430 \u0446\u0435\u043b\u0435\u0432\u0443\u044e \u0441\u0440\u0435\u0434\u0443 \u0440\u0430\u0437\u0432\u0435\u0440\u0442\u044b\u0432\u0430\u043d\u0438\u044f, Quarkus \u043d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 Java-\u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u0438 \u0432 \u0442\u0435\u0445 \u0441\u043b\u0443\u0447\u0430\u044f\u0445, \u043a\u043e\u0433\u0434\u0430 \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u044b\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d \u043d\u0430 \u0443\u0440\u043e\u0432\u043d\u0435 \u0441\u0430\u043c\u043e\u0439 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u044b Kubernetes. \u0412 \u0442\u0430\u0431\u043b\u0438\u0446\u0435 1 \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u0442\u0441\u044f \u043a\u0430\u0440\u0442\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u044f Kubernetes \u0438 \u0442\u0438\u043f\u043e\u0432\u044b\u0445 Java-\u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u043e\u0432, \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u043c\u044b\u0445 Spring-\u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430\u043c\u0438.<\/p>\n<p>  <i>\u0422\u0430\u0431\u043b\u0438\u0446\u0430 1. \u041a\u0430\u0440\u0442\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u044f Java-\u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u043e\u0432 \u0438 Kubernetes.<\/i>  <\/p>\n<div class=\"scrollable-table\">\n<table>\n<tr>\n<th>\u0424\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b<\/th>\n<th>\u0422\u0440\u0430\u0434\u0438\u0446\u0438\u043e\u043d\u043d\u044b\u0439 Spring Boot<\/th>\n<th>Kubernetes<\/th>\n<\/tr>\n<tr>\n<td>Service discovery<\/td>\n<td>Eureka<\/td>\n<td>DNS<\/td>\n<\/tr>\n<tr>\n<td>Configuration<\/td>\n<td>Spring Cloud Config<\/td>\n<td>Config Maps \/ Secrets<\/td>\n<\/tr>\n<tr>\n<td>Load balancing<\/td>\n<td>Ribbon (\u043d\u0430 \u0441\u0442\u043e\u0440\u043e\u043d\u0435 \u043a\u043b\u0438\u0435\u043d\u0442\u0430)<\/td>\n<td>Service, Replication Controller(\u043d\u0430 \u0441\u0442\u043e\u0440\u043e\u043d\u0435 \u0441\u0435\u0440\u0432\u0435\u0440\u0430)<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<p>  <\/p>\n<h3>\u041a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u044f \u0438 \u0437\u0430\u043f\u0443\u0441\u043a \u043a\u043e\u0434\u0430 \u0438\u0437 \u043f\u0440\u0438\u043c\u0435\u0440\u0430<\/h3>\n<p>  \u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u043c\u044b \u0441\u0441\u044b\u043b\u0430\u0435\u043c\u0441\u044f \u043d\u0430 <a href=\"https:\/\/github.com\/jclingan\/quarkus-spring-microprofile\">\u043f\u0440\u0438\u043c\u0435\u0440 \u043f\u0440\u043e\u0435\u043a\u0442\u0430<\/a>, \u0433\u0434\u0435 \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f API-\u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u044b Spring \u0438 MicroProfile \u0438 \u0434\u0430\u0436\u0435 \u0442\u043e\u0442 \u0441\u0430\u043c\u044b\u0439 Java-\u043a\u043b\u0430\u0441\u0441. \u041a\u043e\u0434 \u0438\u0437 \u044d\u0442\u043e\u0433\u043e \u043f\u0440\u0438\u043c\u0435\u0440\u0430 \u043c\u043e\u0436\u043d\u043e \u0441\u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0438 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u0438\u0437 \u043a\u043e\u043c\u0430\u043d\u0434\u043d\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0438, \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435 \u0441\u043c. \u0444\u0430\u0439\u043b README.md.<\/p>\n<h3>API-\u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u044b Spring Framework<\/h3>\n<p>  <\/p>\n<h4>Dependency Injection<\/h4>\n<p>  Quarkus \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 \u0446\u0435\u043b\u044b\u0439 \u0440\u044f\u0434 <a href=\"https:\/\/quarkus.io\/guides\/cdi-reference\">API-\u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u043e\u0432 Contexts and Dependency Injection (CDI)<\/a> \u0438 API-\u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u043e\u0432 Spring Dependency Injection (Spring DI). \u0415\u0441\u043b\u0438 \u0432\u044b \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442\u0435 \u0441 MicroProfile, <a href=\"https:\/\/developers.redhat.com\/blog\/2019\/09\/12\/jakarta-ee-8-the-new-era-of-java-ee-explained\/\">Java EE \u0438 Jakarta EE<\/a>, \u0442\u043e \u0443\u0436\u0435 \u0445\u043e\u0440\u043e\u0448\u043e \u0437\u043d\u0430\u043a\u043e\u043c\u044b \u0441 CDI. \u0421 \u0434\u0440\u0443\u0433\u043e\u0439 \u0441\u0442\u043e\u0440\u043e\u043d\u044b, Spring-\u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438 \u043c\u043e\u0433\u0443\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c Quarkus Extension for Spring DI API \u0434\u043b\u044f \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0435\u043d\u0438\u044f \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u043e\u0441\u0442\u0438 \u0441 Spring DI. \u041f\u0440\u0438\u043c\u0435\u0440\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u043c\u044b\u0445 Spring DI API \u043f\u0440\u0438\u0432\u043e\u0434\u044f\u0442\u0441\u044f \u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u0435 2.<\/p>\n<p>  \u0412 <a href=\"https:\/\/github.com\/jclingan\/quarkus-spring-microprofile\">\u043f\u0440\u043e\u0435\u043a\u0442\u0435 \u0438\u0437 \u043d\u0430\u0448\u0435\u0433\u043e \u043f\u0440\u0438\u043c\u0435\u0440\u0430<\/a> \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u043a\u0430\u043a CDI, \u0442\u0430\u043a \u0438 Spring Dependency Injection. \u0414\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0441\u0432\u0435\u0434\u0435\u043d\u0438\u044f \u0438 \u043f\u0440\u0438\u043c\u0435\u0440\u044b \u043d\u0430 \u044d\u0442\u0443 \u0442\u0435\u043c\u0443 \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u0439\u0442\u0438 \u0432 \u0440\u0443\u043a\u043e\u0432\u043e\u0434\u0441\u0442\u0432\u0435 Quarkus, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f <a href=\"https:\/\/quarkus.io\/guides\/spring-di\">Spring DI Guide<\/a>.<\/p>\n<p>  <i>\u0422\u0430\u0431\u043b\u0438\u0446\u0430 2. \u041f\u0440\u0438\u043c\u0435\u0440\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u043c\u044b\u0445 API-\u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u043e\u0432 Spring DI.<\/i>  <\/p>\n<div class=\"scrollable-table\">\n<table>\n<tr>\n<th>\u041f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u043c\u044b\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 Spring DI<\/th>\n<th>\u041f\u0440\u0438\u043c\u0435\u0440\u044b<\/th>\n<\/tr>\n<tr>\n<td>Constructor Injection<\/td>\n<td>\n<pre><code class=\"plaintext\">public PersonSpringController(    PersonSpringRepository personRepository,  \/\/ injected          PersonSpringMPService personService) {    \/\/ injected       this.personRepository = personRepository;       this.personService = personService; } <\/code><\/pre>\n<\/td>\n<\/tr>\n<tr>\n<td>Field Injection<br \/>  <a href=\"https:\/\/habr.com\/ru\/users\/autowired\/\" class=\"user_link\">Autowired<\/a><br \/>  <a href=\"https:\/\/habr.com\/ru\/users\/value\/\" class=\"user_link\">Value<\/a>  <\/td>\n<td>\n<pre><code class=\"plaintext\">@Autowired @RestClient SalutationRestClient salutationRestClient;  @Value(&quot;${fallbackSalutation}&quot;) String fallbackSalutation; <\/code><\/pre>\n<\/td>\n<\/tr>\n<tr>\n<td><a href=\"https:\/\/habr.com\/ru\/users\/bean\/\" class=\"user_link\">Bean<\/a><br \/>  @Configuration  <\/td>\n<td>\n<pre><code class=\"plaintext\">@Configuration public class AppConfiguration {    @Bean(name = &quot;capitalizeFunction&quot;)    public StringFunction capitalizer() {       return String::toUpperCase;    } } <\/code><\/pre>\n<\/td>\n<\/tr>\n<tr>\n<td><a href=\"https:\/\/habr.com\/ru\/users\/component\/\" class=\"user_link\">Component<\/a>  <\/td>\n<td>\n<pre><code class=\"plaintext\">@Component(&quot;noopFunction&quot;) public class NoOpSingleStringFunction implements StringFunction {    @Override    public String apply(String s) {       return s;    } } <\/code><\/pre>\n<\/td>\n<\/tr>\n<tr>\n<td><a href=\"https:\/\/habr.com\/ru\/users\/service\/\" class=\"user_link\">Service<\/a>  <\/td>\n<td>\n<pre><code class=\"plaintext\">@Service public class MessageProducer {    @Value(&quot;${greeting.message}&quot;)    String message;     public String getPrefix() {       return message;    } } <\/code><\/pre>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<p>  <\/p>\n<h4>\u0412\u0435\u0431-\u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a<\/h4>\n<p>  \u041f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f\u043c MicroProfile \u043f\u043e\u043d\u0440\u0430\u0432\u0438\u0442\u0441\u044f, \u0447\u0442\u043e Quarkus \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 JAX-RS, MicroProfile Rest Client, JSON-P \u0438 JSON-B \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 \u043c\u043e\u0434\u0435\u043b\u0438 \u0432\u0435\u0431-\u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f. Spring-\u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u043e\u0432 \u043f\u0440\u0438\u044f\u0442\u043d\u043e \u043f\u043e\u0440\u0430\u0434\u0443\u0435\u0442 \u043d\u0435\u0434\u0430\u0432\u043d\u043e \u043f\u043e\u044f\u0432\u0438\u0432\u0448\u0430\u044f\u0441\u044f \u0432 Quarkus \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0430 Spring Web API, \u0432 \u0447\u0430\u0441\u0442\u043d\u043e\u0441\u0442\u0438 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u043e\u0432, \u043e\u0442\u0432\u0435\u0447\u0430\u044e\u0449\u0438\u0445 \u0437\u0430 REST. \u041f\u043e \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0438 \u0441\u043e Spring DI \u0433\u043b\u0430\u0432\u043d\u0430\u044f \u0446\u0435\u043b\u044c \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0438 Spring Web API \u0437\u0430\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e\u0431\u044b Spring-\u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438 \u043c\u043e\u0433\u043b\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c API-\u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u044b Spring Web \u0432\u043c\u0435\u0441\u0442\u0435 \u0441 API-\u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430\u043c\u0438 MicroProfile. \u041f\u0440\u0438\u043c\u0435\u0440\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u043c\u044b\u0445 Spring Web API \u043f\u0440\u0438\u0432\u043e\u0434\u044f\u0442\u0441\u044f \u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u0435 3, \u0430 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0441\u0432\u0435\u0434\u0435\u043d\u0438\u044f \u0438 \u043f\u0440\u0438\u043c\u0435\u0440\u044b \u043d\u0430 \u044d\u0442\u0443 \u0442\u0435\u043c\u0443 \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u0439\u0442\u0438 \u0432 \u0440\u0443\u043a\u043e\u0432\u043e\u0434\u0441\u0442\u0432\u0435 Quarkus, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f <a href=\"https:\/\/quarkus.io\/guides\/spring-web\">Spring Web Guide<\/a>.<\/p>\n<p>  <i>\u0422\u0430\u0431\u043b\u0438\u0446\u0430 3. \u041f\u0440\u0438\u043c\u0435\u0440\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u043c\u044b\u0445 API-\u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u043e\u0432 Spring Web.<\/i>  <\/p>\n<div class=\"scrollable-table\">\n<table>\n<tr>\n<th>\u041f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u043c\u044b\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 Spring Web<\/th>\n<th>\u041f\u0440\u0438\u043c\u0435\u0440\u044b<\/th>\n<\/tr>\n<tr>\n<td>@RestController<br \/>  @RequestMapping  <\/td>\n<td>\n<pre><code class=\"plaintext\">@RestController @RequestMapping(&quot;\/person&quot;) public class PersonSpringController {    ...    ...    ... } <\/code><\/pre>\n<\/td>\n<\/tr>\n<tr>\n<td>@GetMapping<br \/>  @PostMapping<br \/>  @PutMapping<br \/>  @DeleteMapping<br \/>  @PatchMapping<br \/>  @RequestParam<br \/>  @RequestHeader<br \/>  @MatrixVariable<br \/>  @PathVariable<br \/>  @CookieValue<br \/>  @RequestBody<br \/>  @ResponseStatus<br \/>  @ExceptionHandler<br \/>  @RestControllerAdvice (partial)  <\/td>\n<td>\n<pre><code class=\"plaintext\">@GetMapping(path = &quot;\/greet\/{id}&quot;,    produces = &quot;text\/plain&quot;)    public String greetPerson(    @PathVariable(name = &quot;id&quot;) long id) {    ...    ...    ... } <\/code><\/pre>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<p>  <\/p>\n<h4>Spring Data JPA<\/h4>\n<p>  \u041f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f\u043c MicroProfile \u0442\u0430\u043a\u0436\u0435 \u043f\u0440\u0438\u0434\u0435\u0442\u0441\u044f \u043f\u043e \u0434\u0443\u0448\u0435, \u0447\u0442\u043e Quarkus \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 JPA \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c Hibernate ORM. \u0414\u043b\u044f Spring-\u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u043e\u0432 \u0442\u043e\u0436\u0435 \u0435\u0441\u0442\u044c \u0445\u043e\u0440\u043e\u0448\u0430\u044f \u043d\u043e\u0432\u043e\u0441\u0442\u044c: Quarkus \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 \u043e\u0431\u0449\u0435\u043f\u0440\u0438\u043d\u044f\u0442\u044b\u0435 \u0430\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u0438 \u0438 \u0442\u0438\u043f\u044b Spring Data JPA. \u041f\u0440\u0438\u043c\u0435\u0440\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u043c\u044b\u0445 Spring Data JPA API \u043f\u0440\u0438\u0432\u043e\u0434\u044f\u0442\u0441\u044f \u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u0435 4.<br \/>  \u0412 <a href=\"https:\/\/github.com\/jclingan\/quarkus-spring-microprofile\">\u043f\u0440\u043e\u0435\u043a\u0442\u0435 \u0438\u0437 \u043d\u0430\u0448\u0435\u0433\u043e \u043f\u0440\u0438\u043c\u0435\u0440\u0430<\/a> \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f API-\u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u044b Spring Data JPA, \u0430 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u0430\u044f \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u0430 \u0432 \u0440\u0443\u043a\u043e\u0432\u043e\u0434\u0441\u0442\u0432\u0435 Quarkus \u043f\u043e\u0434 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435\u043c <a href=\"https:\/\/quarkus.io\/guides\/spring-data-jpa-guide\">Spring Data JPA Guide<\/a>.<\/p>\n<p>  <i>\u0422\u0430\u0431\u043b\u0438\u0446\u0430 4. \u041f\u0440\u0438\u043c\u0435\u0440\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u043c\u044b\u0445 API-\u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u043e\u0432 Spring Data JPA.<\/i>  <\/p>\n<div class=\"scrollable-table\">\n<table>\n<tr>\n<th>\u041f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u043c\u044b\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 Spring Data JPA<\/th>\n<th>\u041f\u0440\u0438\u043c\u0435\u0440\u044b<\/th>\n<\/tr>\n<tr>\n<td>CrudRepository  <\/td>\n<td>\n<pre><code class=\"plaintext\">public interface PersonRepository          extends JpaRepository,                  PersonFragment {    ... } <\/code><\/pre>\n<\/td>\n<\/tr>\n<tr>\n<td>Repository<br \/>  JpaRepository<br \/>  PagingAndSortingRepository  <\/td>\n<td>\n<pre><code class=\"plaintext\">public class PersonRepository extends       Repository {      Person save(Person entity);      Optional findById(Person entity); } <\/code><\/pre>\n<\/td>\n<\/tr>\n<tr>\n<td>Repository Fragments  <\/td>\n<td>\n<pre><code class=\"plaintext\">public interface PersonRepository          extends JpaRepository,                  PersonFragment {    ... } <\/code><\/pre>\n<\/td>\n<\/tr>\n<tr>\n<td>Derived query methods  <\/td>\n<td>\n<pre><code class=\"plaintext\">public interface PersonRepository extends CrudRepository {      List findByName(String name);          Person findByNameBySsn(String ssn);          Optional         findByNameBySsnIgnoreCase(String ssn);      Boolean existsBookByYearOfBirthBetween(             Integer start, Integer end); } <\/code><\/pre>\n<\/td>\n<\/tr>\n<tr>\n<td>User-defined queries  <\/td>\n<td>\n<pre><code class=\"plaintext\">public interface MovieRepository          extends CrudRepository {      Movie findFirstByOrderByDurationDesc();      @Query(&quot;select m from Movie m where m.rating = ?1&quot;)     Iterator findByRating(String rating);      @Query(&quot;from Movie where title = ?1&quot;)     Movie findByTitle(String title); } <\/code><\/pre>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<p>  <\/p>\n<h3>API-\u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u044b MicroProfile<\/h3>\n<p>  <\/p>\n<h4>\u041e\u0442\u043a\u0430\u0437\u043e\u0443\u0441\u0442\u043e\u0439\u0447\u0438\u0432\u043e\u0441\u0442\u044c (Fault tolerance)<\/h4>\n<p>  \u041a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0438 Fault tolerance \u043e\u0447\u0435\u043d\u044c \u0432\u0430\u0436\u043d\u044b \u0434\u043b\u044f \u043f\u0440\u0435\u0434\u043e\u0442\u0432\u0440\u0430\u0449\u0435\u043d\u0438\u044f \u043a\u0430\u0441\u043a\u0430\u0434\u043d\u044b\u0445 \u043e\u0442\u043a\u0430\u0437\u043e\u0432 \u0438 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043d\u0430\u0434\u0435\u0436\u043d\u044b\u0445 \u043c\u0438\u043a\u0440\u043e\u0441\u0435\u0440\u0432\u0438\u0441\u043d\u044b\u0445 \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440. Spring-\u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438 \u0443\u0436\u0435 \u043c\u043d\u043e\u0433\u043e \u043b\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442 \u0434\u043b\u044f \u043e\u0442\u043a\u0430\u0437\u043e\u0443\u0441\u0442\u043e\u0439\u0447\u0438\u0432\u043e\u0441\u0442\u0438 circuit-breaker\u2019\u044b <a href=\"https:\/\/github.com\/Netflix\/Hystrix\">Hystrix<\/a>. \u041e\u0434\u043d\u0430\u043a\u043e Hystrix \u0434\u0430\u0432\u043d\u043e \u043d\u0435 \u043e\u0431\u043d\u043e\u0432\u043b\u044f\u043b\u0441\u044f, \u0430 \u0432\u043e\u0442 MicroProfile\u2019\u0435\u0432\u0441\u043a\u0438\u0439 Fault Tolerance \u0441\u0435\u0439\u0447\u0430\u0441 \u0430\u043a\u0442\u0438\u0432\u043d\u043e \u0440\u0430\u0437\u0432\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0438 \u0438\u043c\u0435\u0435\u0442 \u0437\u0430 \u043f\u043b\u0435\u0447\u0430\u043c\u0438 \u0443\u0436\u0435 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043b\u0435\u0442 \u043f\u0440\u043e\u0434\u0430\u043a\u0448\u043d-\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0434\u043b\u044f \u043f\u043e\u0432\u044b\u0448\u0435\u043d\u0438\u044f \u043d\u0430\u0434\u0435\u0436\u043d\u043e\u0441\u0442\u0438 \u0441\u0435\u0440\u0432\u0438\u0441\u043e\u0432 \u0432 Quarkus \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u0435\u0442\u0441\u044f \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0442\u044c API-\u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u044b MicroProfile Fault Tolerance, \u043f\u0440\u0438\u043c\u0435\u0440\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043f\u0440\u0438\u0432\u043e\u0434\u044f\u0442\u0441\u044f \u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u0435 5. \u0414\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0441\u0432\u0435\u0434\u0435\u043d\u0438\u044f \u043e\u0431 \u044d\u0442\u043e\u043c \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u0439\u0442\u0438 \u0432 \u0440\u0443\u043a\u043e\u0432\u043e\u0434\u0441\u0442\u0432\u0435 Quarkus <a href=\"https:\/\/quarkus.io\/guides\/microprofile-fault-tolerance\">Fault Tolerance Guide<\/a>.<\/p>\n<p>  <i>\u0422\u0430\u0431\u043b\u0438\u0446\u0430 5. \u041f\u0440\u0438\u043c\u0435\u0440\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u043c\u044b\u0445 API-\u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u043e\u0432 MicroProfile Fault Tolerance.<\/i>  <\/p>\n<div class=\"scrollable-table\">\n<table>\n<tr>\n<th>\u0424\u0443\u043d\u043a\u0446\u0438\u0438 MicroProfile Fault Tolerance<\/th>\n<th>\u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435<\/th>\n<th>\u041f\u0440\u0438\u043c\u0435\u0440\u044b<\/th>\n<\/tr>\n<tr>\n<td>@Asynchronous  <\/td>\n<td>\u0412\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u043b\u043e\u0433\u0438\u043a\u0438 \u0432 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u043c \u043f\u043e\u0442\u043e\u043a\u0435  <\/td>\n<td>\n<pre><code class=\"plaintext\">@Asynchronous @Retry public Future&lt;String&gt; getSalutation() {    ...    return future; } <\/code><\/pre>\n<\/td>\n<\/tr>\n<tr>\n<td>@Bulkhead  <\/td>\n<td>\u041e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0430 \u043e\u0434\u043d\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432  <\/td>\n<td>\n<pre><code class=\"plaintext\">@Bulkhead(5) public void fiveConcurrent() {    makeRemoteCall(); \/\/... } <\/code><\/pre>\n<\/td>\n<\/tr>\n<tr>\n<td>@CircuitBreaker  <\/td>\n<td>\u0423\u043c\u043d\u0430\u044f \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u0441\u0431\u043e\u0435\u0432 \u0438 \u0432\u043e\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435 \u043f\u043e\u0441\u043b\u0435 \u0441\u0431\u043e\u0435\u0432  <\/td>\n<td>\n<pre><code class=\"plaintext\">@CircuitBreaker(delay=500   \/\/ milliseconds    failureRatio = .75,    requestVolumeThreshold = 20,    successThreshold = 5) @Fallback(fallbackMethod = &quot;fallback&quot;) public String getSalutation() {    makeRemoteCall(); \/\/... } <\/code><\/pre>\n<\/td>\n<\/tr>\n<tr>\n<td>@Fallback  <\/td>\n<td>\u0412\u044b\u0437\u043e\u0432 \u0430\u043b\u044c\u0442\u0435\u0440\u043d\u0430\u0442\u0438\u0432\u043d\u043e\u0439 \u043b\u043e\u0433\u0438\u043a\u0438 \u0432 \u0441\u043b\u0443\u0447\u0430\u0435 \u0441\u0431\u043e\u044f  <\/td>\n<td>\n<pre><code class=\"plaintext\">@Timeout(500) \/\/ milliseconds @Fallback(fallbackMethod = &quot;fallback&quot;) public String getSalutation() {    makeRemoteCall(); \/\/... }  public String fallback() {    return &quot;hello&quot;; } <\/code><\/pre>\n<\/td>\n<\/tr>\n<tr>\n<td><a href=\"https:\/\/habr.com\/ru\/users\/retry\/\" class=\"user_link\">Retry<\/a>  <\/td>\n<td>\u041f\u043e\u0432\u0442\u043e\u0440 \u043f\u0440\u0438 \u0441\u0431\u043e\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u0430  <\/td>\n<td>\n<pre><code class=\"plaintext\">@Retry(maxRetries=3) public String getSalutation() {    makeRemoteCall(); \/\/... } <\/code><\/pre>\n<\/td>\n<\/tr>\n<tr>\n<td><a href=\"https:\/\/habr.com\/ru\/users\/timeout\/\" class=\"user_link\">Timeout<\/a>  <\/td>\n<td>\u041a\u043e\u043d\u0442\u0440\u043e\u043b\u044c\u043d\u043e\u0435 \u0432\u0440\u0435\u043c\u044f \u043e\u0436\u0438\u0434\u0430\u043d\u0438\u044f \u043f\u0440\u0438 \u0441\u0431\u043e\u0435  <\/td>\n<td>\n<pre><code class=\"plaintext\">@Timeout(value = 500 )   \/\/ milliseconds @Fallback(fallbackMethod = &quot;fallback&quot;) public String getSalutation() {    makeRemoteCall(); \/\/... } <\/code><\/pre>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<p>  <\/p>\n<h4>\u041f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u0441\u0435\u0440\u0432\u0438\u0441\u043e\u0432 (Service Health)<\/h4>\n<p>  Kubernetes-\u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u044b \u043e\u0442\u0441\u043b\u0435\u0436\u0438\u0432\u0430\u044e\u0442 \u0438\u0441\u043f\u0440\u0430\u0432\u043d\u043e\u0441\u0442\u044c \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u043e\u0432 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0445 \u0441\u0435\u0440\u0432\u0438\u0441\u043e\u0432. \u0427\u0442\u043e\u0431\u044b \u043d\u0438\u0436\u0435\u043b\u0435\u0436\u0430\u0449\u0430\u044f \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 \u043c\u043e\u0433\u043b\u0430 \u043c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u0442\u044c \u0441\u0435\u0440\u0432\u0438\u0441\u044b, Spring-\u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438 \u043e\u0431\u044b\u0447\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442 \u043d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u043c\u044b\u0435 HealthIndicator \u0438 Spring Boot Actuator. \u0412 Quarkus \u044d\u0442\u043e \u043c\u043e\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e MicroProfile Health, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u044e\u0442 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0443 \u0440\u0430\u0431\u043e\u0442\u043e\u0441\u043f\u043e\u0441\u043e\u0431\u043d\u043e\u0441\u0442\u0438 (liveness check), \u043d\u043e \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043d\u044b \u0438 \u043d\u0430 \u043e\u0434\u043d\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0443 liveness \u0438 readiness (\u0433\u043e\u0442\u043e\u0432\u043d\u043e\u0441\u0442\u0438). \u041f\u0440\u0438\u043c\u0435\u0440\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u043c\u044b\u0445 MicroProfile Health API \u043f\u0440\u0438\u0432\u043e\u0434\u044f\u0442\u0441\u044f \u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u0435 6, \u0430 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u0430\u044f \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0430 \u0432 \u0440\u0443\u043a\u043e\u0432\u043e\u0434\u0441\u0442\u0432\u0435 Quarkus <a href=\"https:\/\/quarkus.io\/guides\/microprofile-health\">Health Guide<\/a>.<\/p>\n<p>  <i>\u0422\u0430\u0431\u043b\u0438\u0446\u0430 6. \u041f\u0440\u0438\u043c\u0435\u0440\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u043c\u044b\u0445 API-\u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u043e\u0432 MicroProfile Health.<\/i>  <\/p>\n<div class=\"scrollable-table\">\n<table>\n<tr>\n<th>\u0424\u0443\u043d\u043a\u0446\u0438\u0438 MicroProfile Health<\/th>\n<th>\u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435<\/th>\n<th>\u041f\u0440\u0438\u043c\u0435\u0440\u044b<\/th>\n<\/tr>\n<tr>\n<td>@Liveness  <\/td>\n<td>\u041f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442 \u043f\u0435\u0440\u0435\u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0443 \u043d\u0435\u0438\u0441\u043f\u0440\u0430\u0432\u043d\u044b\u0445 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0438\u0437\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439<br \/>  Endpoint:<br \/>  host:8080\/health\/live  <\/td>\n<td>\n<pre><code class=\"plaintext\">@Liveness public class MyHC implements HealthCheck {   public HealthCheckResponse call() {     ...    return HealthCheckResponse      .named(&quot;myHCProbe&quot;)      .status(ready ? true:false)      .withData(&quot;mydata&quot;, data)      .build();   } <\/code><\/pre>\n<\/td>\n<\/tr>\n<tr>\n<td>@Readiness  <\/td>\n<td>\u041f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 \u043d\u0435 \u0431\u0443\u0434\u0435\u0442 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u0442\u0440\u0430\u0444\u0438\u043a \u043d\u0430 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0438\u0437\u043e\u0432\u0430\u043d\u043d\u043e\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439 \u0432 \u0441\u043b\u0443\u0447\u0430\u0435 \u0435\u0433\u043e \u043d\u0435\u0433\u043e\u0442\u043e\u0432\u043d\u043e\u0441\u0442\u0438<br \/>  Endpoint:<br \/>  host:8080\/health\/ready  <\/td>\n<td>\n<pre><code class=\"plaintext\">@Readiness public class MyHC implements HealthCheck {   public HealthCheckResponse call() {     ...    return HealthCheckResponse      .named(&quot;myHCProbe&quot;)      .status(live ? true:false)      .withData(&quot;mydata&quot;, data)      .build();   } <\/code><\/pre>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<p>  <\/p>\n<h4>\u041c\u0435\u0442\u0440\u0438\u043a\u0438<\/h4>\n<p>  \u041f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0442 \u043c\u0435\u0442\u0440\u0438\u043a\u0438 \u0438\u043b\u0438 \u0432 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0445 \u0446\u0435\u043b\u044f\u0445 (\u0434\u043b\u044f \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044f SLA-\u043f\u043e\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u0435\u0439 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438), \u0438\u043b\u0438 \u0432 \u043d\u0435\u043e\u043f\u0435\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0445 (\u0431\u0438\u0437\u043d\u0435\u0441-\u043f\u043e\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u0438 SLA). Spring-\u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438 \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0442 \u043c\u0435\u0442\u0440\u0438\u043a\u0438 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e Spring Boot Actuator \u0438 Micrometer. \u0412 \u0441\u0432\u043e\u044e \u043e\u0447\u0435\u0440\u0435\u0434\u044c, Quarkus \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 MicroProfile Metrics \u0434\u043b\u044f \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0431\u0430\u0437\u043e\u0432\u044b\u0445 \u043c\u0435\u0442\u0440\u0438\u043a (JVM \u0438 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u0430\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u0430), \u0432\u0435\u043d\u0434\u043e\u0440-\u043c\u0435\u0442\u0440\u0438\u043a (Quarkus) \u0438 \u043c\u0435\u0442\u0440\u0438\u043a \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439. MicroProfile Metrics \u0442\u0440\u0435\u0431\u0443\u0435\u0442, \u0447\u0442\u043e\u0431\u044b \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u043b\u0430 \u0432\u044b\u0445\u043e\u0434\u043d\u044b\u0435 \u0444\u043e\u0440\u043c\u0430\u0442\u044b JSON \u0438 OpenMetrics (Prometheus). \u041f\u0440\u0438\u043c\u0435\u0440\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f MicroProfile Metrics API \u043f\u0440\u0438\u0432\u043e\u0434\u044f\u0442\u0441\u044f \u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u0435 7.<\/p>\n<p>  \u0412 <a href=\"https:\/\/github.com\/jclingan\/quarkus-spring-microprofile\">\u043f\u0440\u043e\u0435\u043a\u0442\u0435 \u0438\u0437 \u043d\u0430\u0448\u0435\u0433\u043e \u043f\u0440\u0438\u043c\u0435\u0440\u0430<\/a> MicroProfile Metrics \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u0434\u043b\u044f \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043c\u0435\u0442\u0440\u0438\u043a \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f. \u0414\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0441\u0432\u0435\u0434\u0435\u043d\u0438\u044f \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u0439\u0442\u0438 \u0432 \u0440\u0443\u043a\u043e\u0432\u043e\u0434\u0441\u0442\u0432\u0435 Quarkus <a href=\"https:\/\/quarkus.io\/guides\/microprofile-metrics\">Metrics Guide<\/a>.<\/p>\n<p>  <i>\u0422\u0430\u0431\u043b\u0438\u0446\u0430 7. \u041f\u0440\u0438\u043c\u0435\u0440\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f API-\u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u043e\u0432 MicroProfile Metrics.<\/i>  <\/p>\n<div class=\"scrollable-table\">\n<table>\n<tr>\n<th>\u0424\u0443\u043d\u043a\u0446\u0438\u0438 MicroProfile Metrics<\/th>\n<th>\u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435<\/th>\n<th>\u041f\u0440\u0438\u043c\u0435\u0440\u044b<\/th>\n<\/tr>\n<tr>\n<td>@Counted  <\/td>\n<td>\u041e\u0431\u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442 counter-\u0441\u0447\u0435\u0442\u0447\u0438\u043a, \u043f\u043e\u0434\u0441\u0447\u0438\u0442\u044b\u0432\u0430\u044e\u0449\u0438\u0439 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0432\u044b\u0437\u043e\u0432\u043e\u0432 \u0430\u043d\u043d\u043e\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0433\u043e \u043e\u0431\u044a\u0435\u043a\u0442\u0430  <\/td>\n<td>\n<pre><code class=\"plaintext\">@Counted(name = &quot;fallbackCounter&quot;,    displayName = &quot;Fallback Counter&quot;,    description = &quot;Fallback Counter&quot;) public String salutationFallback() {    return fallbackSalutation; } <\/code><\/pre>\n<\/td>\n<\/tr>\n<tr>\n<td>@ConcurrentGauge  <\/td>\n<td>\u041e\u0431\u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442 gauge-\u0434\u0430\u0442\u0447\u0438\u043a, \u043f\u043e\u0434\u0441\u0447\u0438\u0442\u044b\u0432\u0430\u044e\u0449\u0438\u0439 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043f\u0430\u0440\u0430\u043b\u043b\u0435\u043b\u044c\u043d\u044b\u0445 \u0432\u044b\u0437\u043e\u0432\u043e\u0432 \u0430\u043d\u043d\u043e\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0433\u043e \u043e\u0431\u044a\u0435\u043a\u0442\u0430  <\/td>\n<td>\n<pre><code class=\"plaintext\">@ConcurrentGuage(   name = &quot;fallbackConcurrentGauge&quot;,    displayName=&quot;Fallback Concurrent&quot;,    description=&quot;Fallback Concurrent&quot;) public String salutationFallback() {    return fallbackSalutation; } <\/code><\/pre>\n<\/td>\n<\/tr>\n<tr>\n<td>@Gauge  <\/td>\n<td>\u041e\u0431\u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442 gauge-\u0434\u0430\u0442\u0447\u0438\u043a, \u0437\u0430\u043c\u0435\u0440\u044f\u044e\u0449\u0438\u0439 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0430\u043d\u043d\u043e\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0433\u043e \u043e\u0431\u044a\u0435\u043a\u0442\u0430  <\/td>\n<td>\n<pre><code class=\"plaintext\">@Metered(name = &quot;FallbackGauge&quot;,    displayName=&quot;Fallback Gauge&quot;,    description=&quot;Fallback frequency&quot;) public String salutationFallback() {    return fallbackSalutation; } <\/code><\/pre>\n<\/td>\n<\/tr>\n<tr>\n<td>@Metered  <\/td>\n<td>\u041e\u0431\u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442 meter-\u0434\u0430\u0442\u0447\u0438\u043a, \u043e\u0442\u0441\u043b\u0435\u0436\u0438\u0432\u0430\u044e\u0449\u0438\u0439 \u0447\u0430\u0441\u0442\u043e\u0442\u0443 \u0432\u044b\u0437\u043e\u0432\u0430 \u0430\u043d\u043d\u043e\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0433\u043e \u043e\u0431\u044a\u0435\u043a\u0442\u0430  <\/td>\n<td>\n<pre><code class=\"plaintext\">@Metered(name = &quot;MeteredFallback&quot;,    displayName=&quot;Metered Fallback&quot;,    description=&quot;Fallback frequency&quot;) public String salutationFallback() {    return fallbackSalutation; } <\/code><\/pre>\n<\/td>\n<\/tr>\n<tr>\n<td><a href=\"https:\/\/habr.com\/ru\/users\/metric\/\" class=\"user_link\">Metric<\/a>  <\/td>\n<td>\u0410\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u044f, \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0449\u0430\u044f \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e \u043c\u0435\u0442\u0430\u0434\u0430\u043d\u043d\u044b\u0445, \u043f\u0440\u0438 \u043f\u043e\u0441\u0442\u0443\u043f\u043b\u0435\u043d\u0438\u0438 \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u043d\u0430 \u0432\u043d\u0435\u0441\u0435\u043d\u0438\u0435 \u0438\u043b\u0438 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0441\u0442\u0432\u043e \u043c\u0435\u0442\u0440\u0438\u043a\u0438  <\/td>\n<td>\n<pre><code class=\"plaintext\">@Metric @Metered(name = &quot;MeteredFallback&quot;,    displayName=&quot;Metered Fallback&quot;,    description=&quot;Fallback frequency&quot;) public String salutationFallback() {    return fallbackSalutation; } <\/code><\/pre>\n<\/td>\n<\/tr>\n<tr>\n<td><a href=\"https:\/\/habr.com\/ru\/users\/timed\/\" class=\"user_link\">Timed<\/a>  <\/td>\n<td>\u041e\u0431\u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442 \u0442\u0430\u0439\u043c\u0435\u0440, \u043e\u0442\u0441\u043b\u0435\u0436\u0438\u0432\u0430\u044e\u0449\u0438\u0439 \u0434\u043b\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0430\u043d\u043d\u043e\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0433\u043e \u043e\u0431\u044a\u0435\u043a\u0442\u0430  <\/td>\n<td>\n<pre><code class=\"plaintext\">@Timed(name = &quot;TimedFallback&quot;,    displayName=&quot;Timed Fallback&quot;,    description=&quot;Fallback delay&quot;) public String salutationFallback() {    return fallbackSalutation; } <\/code><\/pre>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<p>  <b>\u041a\u043e\u043d\u0435\u0447\u043d\u044b\u0435 \u0442\u043e\u0447\u043a\u0438 \u043c\u0435\u0442\u0440\u0438\u043a (Metrics Endpoints)<\/b><\/p>\n<p>  \u041c\u0435\u0442\u0440\u0438\u043a\u0438 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439 <a href=\"http:\/\/localhost\">localhost<\/a>:8080\/metrics\/application<br \/>  \u0411\u0430\u0437\u043e\u0432\u044b\u0435 \u043c\u0435\u0442\u0440\u0438\u043a\u0438 <a href=\"http:\/\/localhost\">localhost<\/a>:8080\/metrics\/base<br \/>  \u0412\u0435\u043d\u0434\u043e\u0440-\u043c\u0435\u0442\u0440\u0438\u043a\u0438 <a href=\"http:\/\/localhost\">localhost<\/a>:8080\/metrics\/vendor<br \/>  \u0412\u0441\u0435 \u043c\u0435\u0442\u0440\u0438\u043a\u0438 <a href=\"http:\/\/localhost\">localhost<\/a>:8080\/metrics<\/p>\n<h4>Rest-\u043a\u043b\u0438\u0435\u043d\u0442 MicroProfile<\/h4>\n<p>  \u041c\u0438\u043a\u0440\u043e\u0441\u0435\u0440\u0432\u0438\u0441\u044b \u0447\u0430\u0441\u0442\u043e \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0442 \u043a\u043e\u043d\u0435\u0447\u043d\u044b\u0435 \u0442\u043e\u0447\u043a\u0438 RESTful, \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u043a\u043e\u0442\u043e\u0440\u044b\u043c\u0438 \u0442\u0440\u0435\u0431\u0443\u044e\u0442\u0441\u044f \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0435 \u043a\u043b\u0438\u0435\u043d\u0442\u0441\u043a\u0438\u0435 API. \u0427\u0442\u043e\u0431\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043a\u043e\u043d\u0435\u0447\u043d\u044b\u0435 \u0442\u043e\u0447\u043a\u0438 RESTful, Spring-\u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438 \u043e\u0431\u044b\u0447\u043d\u043e \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u044e\u0442 RestTemplate. Quarkus \u0436\u0435 \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u0435\u0442 \u0434\u043b\u044f \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u044d\u0442\u043e\u0439 \u0437\u0430\u0434\u0430\u0447\u0438 API-\u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u044b MicroProfile Rest Client, \u043f\u0440\u0438\u043c\u0435\u0440\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043f\u0440\u0438\u0432\u043e\u0434\u044f\u0442\u0441\u044f \u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u0435 8.<\/p>\n<p>  \u0412 <a href=\"https:\/\/github.com\/jclingan\/quarkus-spring-microprofile\">\u043f\u0440\u043e\u0435\u043a\u0442\u0435 \u0438\u0437 \u043d\u0430\u0448\u0435\u0433\u043e \u043f\u0440\u0438\u043c\u0435\u0440\u0430<\/a> \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u043a\u043e\u043d\u0435\u0447\u043d\u044b\u0445 \u0442\u043e\u0447\u0435\u043a RESTful \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e MicroProfile Rest Client. \u0414\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0441\u0432\u0435\u0434\u0435\u043d\u0438\u044f \u0438 \u043f\u0440\u0438\u043c\u0435\u0440\u044b \u043d\u0430 \u044d\u0442\u0443 \u0442\u0435\u043c\u0443 \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u0439\u0442\u0438 \u0432 \u0440\u0443\u043a\u043e\u0432\u043e\u0434\u0441\u0442\u0432\u0435 Quarkus <a href=\"https:\/\/quarkus.io\/guides\/rest-client\">Rest Client Guide<\/a>.<\/p>\n<p>  <i>\u0422\u0430\u0431\u043b\u0438\u0446\u0430 8. \u041f\u0440\u0438\u043c\u0435\u0440\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f API-\u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u043e\u0432 MicroProfile Rest Client.<\/i>  <\/p>\n<div class=\"scrollable-table\">\n<table>\n<tr>\n<th>\u0424\u0443\u043d\u043a\u0446\u0438\u0438 MicroProfile Rest Client<\/th>\n<th>\u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435<\/th>\n<th>\u041f\u0440\u0438\u043c\u0435\u0440\u044b<\/th>\n<\/tr>\n<tr>\n<td>@RegisterRestClient  <\/td>\n<td>\u0420\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u0443\u0435\u0442 \u0442\u0438\u043f\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 Java-\u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043a\u043b\u0438\u0435\u043d\u0442\u0430 REST  <\/td>\n<td>\n<pre><code class=\"plaintext\">@RegisterRestClient @Path(&quot;\/&quot;) public interface MyRestClient {     @GET     @Produces(MediaType.TEXT_PLAIN)     public String getSalutation(); } <\/code><\/pre>\n<\/td>\n<\/tr>\n<tr>\n<td>@RestClient  <\/td>\n<td>\u041e\u0442\u043c\u0435\u0447\u0430\u0435\u0442 \u0432\u043d\u0435\u0434\u0440\u0435\u043d\u0438\u0435 \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440\u0430 \u0442\u0438\u043f\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0433\u043e \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430 REST-\u043a\u043b\u0438\u0435\u043d\u0442\u0430  <\/td>\n<td>\n<pre><code class=\"plaintext\">@Autowired \/\/ or @Inject @RestClient MyRestClient restClient; <\/code><\/pre>\n<\/td>\n<\/tr>\n<tr>\n<td>Invocation  <\/td>\n<td>\u0412\u044b\u0437\u044b\u0432\u0430\u0435\u0442 \u043a\u043e\u043d\u0435\u0447\u043d\u0443\u044e \u0442\u043e\u0447\u043a\u0443 REST  <\/td>\n<td>\n<pre><code class=\"plaintext\">System.out.println(    restClient.getSalutation()); <\/code><\/pre>\n<\/td>\n<\/tr>\n<tr>\n<td>mp-rest\/url  <\/td>\n<td>\u0417\u0430\u0434\u0430\u0435\u0442 \u043a\u043e\u043d\u0435\u0447\u043d\u0443\u044e \u0442\u043e\u0447\u043a\u0443 REST  <\/td>\n<td>\n<pre><code class=\"plaintext\">application.properties: org.example.MyRestClient\/mp-rest\/url=    http:\/\/localhost:8081\/myendpoint <\/code><\/pre>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<p>  <\/p>\n<h3>\u0418\u0442\u043e\u0433\u0438<\/h3>\n<p>  \u0412 \u044d\u0442\u043e\u043c \u0431\u043b\u043e\u0433\u0435, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0432 \u043f\u0435\u0440\u0432\u0443\u044e \u043e\u0447\u0435\u0440\u0435\u0434\u044c \u043f\u0440\u0438\u0433\u043e\u0434\u0438\u0442\u0441\u044f Spring-\u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430\u043c, \u043c\u044b \u043a\u0440\u0430\u0442\u043a\u043e \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u043b\u0438, \u043a\u0430\u043a \u0432 Quarkus \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c API-\u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u044b Spring \u0432\u043c\u0435\u0441\u0442\u0435 API-\u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430\u043c\u0438 MicroProfile, \u0447\u0442\u043e\u0431\u044b \u0440\u0430\u0437\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0442\u044c \u043c\u0438\u043a\u0440\u043e\u0441\u0435\u0440\u0432\u0438\u0441\u044b Java \u0438 \u0437\u0430\u0442\u0435\u043c \u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0438\u0445 \u0432 \u043d\u0430\u0442\u0438\u0432\u043d\u044b\u0439 \u0434\u0432\u043e\u0438\u0447\u043d\u044b\u0439 \u043a\u043e\u0434, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u044d\u043a\u043e\u043d\u043e\u043c\u0438\u0442 \u0441\u043e\u0442\u043d\u0438 \u043c\u0435\u0433\u0430\u0431\u0430\u0439\u0442 \u043e\u043f\u0435\u0440\u0430\u0442\u0438\u0432\u043d\u043e\u0439 \u043f\u0430\u043c\u044f\u0442\u0438 \u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442\u0441\u044f \u0437\u0430 \u0441\u0447\u0438\u0442\u0430\u043d\u043d\u044b\u0435 \u043c\u0438\u043b\u043b\u0438\u0441\u0435\u043a\u0443\u043d\u0434\u044b.<\/p>\n<p>  \u041a\u0430\u043a \u0432\u044b \u0443\u0436\u0435 \u043f\u043e\u043d\u044f\u043b\u0438, \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0441\u0432\u0435\u0434\u0435\u043d\u0438\u044f \u043e \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0435 API-\u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u043e\u0432 Spring \u0438 MicroProfile, \u0430 \u0442\u0430\u043a\u0436\u0435 \u043c\u0430\u0441\u0441\u0443 \u0434\u0440\u0443\u0433\u043e\u0439 \u043f\u043e\u043b\u0435\u0437\u043d\u043e\u0439 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u0439\u0442\u0438 \u0432 <a href=\"https:\/\/quarkus.io\/guides\/\">\u0440\u0443\u043a\u043e\u0432\u043e\u0434\u0441\u0442\u0432\u0430\u0445 Quarkus<\/a>.<\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/company\/redhatrussia\/blog\/497504\/\"> https:\/\/habr.com\/ru\/company\/redhatrussia\/blog\/497504\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"\n<div class=\"post__text post__text-html post__text_v1\" id=\"post-content-body\" data-io-article-url=\"https:\/\/habr.com\/ru\/company\/redhatrussia\/blog\/497504\/\">\u0412\u0441\u0435\u043c \u043f\u0440\u0438\u0432\u0435\u0442, \u0438 \u0441 \u0432\u0430\u043c\u0438 \u0442\u0440\u0435\u0442\u0438\u0439 \u043f\u043e\u0441\u0442 \u0438\u0437 \u0441\u0435\u0440\u0438\u0438 \u043f\u0440\u043e Quarkus!<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/po\/ux\/ir\/pouxirwqx8fafftuhwwcma0jw5q.jpeg\" width=\"100%\"><\/p>\n<p>  \u041f\u0440\u0438 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0435 Java-\u043c\u0438\u043a\u0440\u043e\u0441\u0435\u0440\u0432\u0438\u0441\u043e\u0432 \u0447\u0430\u0441\u0442\u043e \u0441\u0447\u0438\u0442\u0430\u0435\u0442\u0441\u044f, \u0447\u0442\u043e <a href=\"https:\/\/developers.redhat.com\/blog\/2019\/02\/28\/jumpstart-microservices-microprofile-starter-beta\/\">Eclipse MicroProfile<\/a> \u0438 <a href=\"https:\/\/developers.redhat.com\/topics\/spring-boot\/\">Spring Boot<\/a> \u2013 \u044d\u0442\u043e \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0435 \u0438 \u043d\u0435\u0437\u0430\u0432\u0438\u0441\u0438\u043c\u044b\u0435 \u0434\u0440\u0443\u0433 \u043e\u0442 \u0434\u0440\u0443\u0433\u0430 API. \u041f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e, \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0441\u0442\u044b, \u043a\u0430\u043a \u043f\u0440\u0430\u0432\u0438\u043b\u043e, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442 \u0442\u0435 API, \u043a \u043a\u043e\u0442\u043e\u0440\u044b\u043c \u043e\u043d\u0438 \u0443\u0436\u0435 \u043f\u0440\u0438\u0432\u044b\u043a\u043b\u0438, \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u0438\u0437\u0443\u0447\u0435\u043d\u0438\u0435 \u043d\u043e\u0432\u044b\u0445 \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u043e\u0432 \u0438 runtime-\u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043e\u0432 \u0442\u0440\u0435\u0431\u0443\u0435\u0442 \u043c\u043d\u043e\u0433\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438. \u0421\u0435\u0433\u043e\u0434\u043d\u044f \u043c\u044b \u043f\u043e\u043f\u0440\u043e\u0431\u0443\u0435\u043c \u0443\u043f\u0440\u043e\u0441\u0442\u0438\u0442\u044c \u043e\u0441\u0432\u043e\u0435\u043d\u0438\u0435 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u044b\u0445 <a href=\"https:\/\/developers.redhat.com\/blog\/2018\/11\/21\/eclipse-microprofile-for-spring-boot-developers\/\">MicroProfile API \u0434\u043b\u044f Spring-\u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u043e\u0432<\/a> \u0438 \u043f\u043e\u043a\u0430\u0436\u0435\u043c, \u043a\u0430\u043a \u043e\u0434\u043d\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e \u0437\u0430\u0434\u0435\u0439\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c Spring API \u0438 \u043d\u043e\u0432\u044b\u0435 \u043f\u043e\u043b\u0435\u0437\u043d\u044b\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 <a href=\"https:\/\/quarkus.io\/\">Quarkus<\/a>.  <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-302001","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/302001","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=302001"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/302001\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=302001"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=302001"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=302001"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}