{"id":367615,"date":"2024-05-21T03:24:34","date_gmt":"2024-05-21T03:24:34","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=367615"},"modified":"-0001-11-30T00:00:00","modified_gmt":"2024-05-21T03:24:34","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=367615","title":{"rendered":"<span>\u0420\u0430\u0437\u0431\u0438\u0440\u0430\u0435\u043c\u0441\u044f \u0432 \u0430\u0432\u0442\u043e\u0442\u0435\u0441\u0442\u0430\u0445 gRPC \u0431\u0435\u0437 \u0431\u043e\u043b\u0438 \u0438 \u0441\u0435\u0434\u044b\u0445 \u0432\u043e\u043b\u043e\u0441<\/span>"},"content":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u0412\u0441\u0435\u043c \u043f\u0440\u0438\u0432\u0435\u0442! \u041c\u0435\u043d\u044f \u0437\u043e\u0432\u0443\u0442 \u041a\u0430\u0442\u044f \u041c\u0443\u043b\u0438\u0447\u0435\u0432\u0430, \u044f \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0449\u0438\u0446\u0430 \u0432 \u0421\u0418\u0411\u0423\u0420 \u0414\u0438\u0434\u0436\u0438\u0442\u0430\u043b. \u041f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0435 \u0434\u0432\u0430 \u0433\u043e\u0434\u0430 \u044f \u043f\u0438\u0448\u0443 \u0430\u0432\u0442\u043e\u0442\u0435\u0441\u0442\u044b \u0434\u043b\u044f gRPC \u043d\u0430 Kotlin. \u041f\u043e\u043b\u0443\u0447\u0438\u0432 \u043e\u043f\u044b\u0442, \u044f \u0437\u0430\u0445\u043e\u0442\u0435\u043b\u0430 \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0441\u0442\u0430\u0442\u044c\u044e, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043e\u0447\u0435\u043d\u044c \u043f\u0440\u0438\u0433\u043e\u0434\u0438\u043b\u0430\u0441\u044c \u0431\u044b \u043c\u043d\u0435 \u0441\u0430\u043c\u043e\u0439, \u043a\u043e\u0433\u0434\u0430 \u044f \u0442\u043e\u043b\u044c\u043a\u043e \u043d\u0430\u0447\u0438\u043d\u0430\u043b\u0430 \u0440\u0430\u0437\u0431\u0438\u0440\u0430\u0442\u044c\u0441\u044f \u0441 gRPC. \u041d\u0430\u0434\u0435\u044e\u0441\u044c, \u0432\u044b \u043d\u0430\u0439\u0434\u0435\u0442\u0435 \u0435\u0451 \u043f\u043e\u043b\u0435\u0437\u043d\u043e\u0439 \u0434\u043b\u044f \u0441\u0435\u0431\u044f!<\/p>\n<h2>\u041d\u0435\u043c\u043d\u043e\u0433\u043e \u0442\u0435\u043e\u0440\u0438\u0438<\/h2>\n<p><strong>\u0414\u043b\u044f \u0447\u0435\u0433\u043e \u043d\u0443\u0436\u0435\u043d API<\/strong><\/p>\n<p>\u041d\u0430\u0447\u043d\u0451\u043c \u0441 \u043e\u0441\u043d\u043e\u0432. \u0423 \u043d\u0430\u0441 \u0435\u0441\u0442\u044c \u0441\u0435\u0440\u0432\u0438\u0441\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u044b \u043d\u0430 \u0440\u0430\u0437\u043d\u044b\u0445 \u044f\u0437\u044b\u043a\u0430\u0445 \u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0440\u0430\u0437\u043d\u044b\u0435 \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u044b. \u0427\u0442\u043e\u0431\u044b \u043e\u043d\u0438 \u043c\u043e\u0433\u043b\u0438 \u043c\u0435\u0436\u0434\u0443 \u0441\u043e\u0431\u043e\u0439 \u043e\u0431\u0449\u0430\u0442\u044c\u0441\u044f, \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u0441\u043f\u043e\u0441\u043e\u0431 \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0438 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439. \u041e\u0434\u0438\u043d \u0438\u0437 \u0442\u0430\u043a\u0438\u0445 \u0441\u043f\u043e\u0441\u043e\u0431\u043e\u0432 \u2014 RPC \u0438 \u0435\u0433\u043e \u043c\u043e\u0434\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u044f \u043e\u0442 Google \u2014 gRPC.<\/p>\n<p>gRPC \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u0434\u043b\u044f \u043e\u0431\u0449\u0435\u043d\u0438\u044f \u0444\u043e\u0440\u043c\u0430\u0442 <strong>protobuf<\/strong>, \u0442\u0430\u043a\u0436\u0435 \u043f\u0440\u0438\u0434\u0443\u043c\u0430\u043d\u043d\u044b\u0439 Google. \u0425\u043e\u0442\u044f \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0438 \u0434\u0440\u0443\u0433\u0438\u0435 \u0444\u043e\u0440\u043c\u0430\u0442\u044b \u2014\u00a0 \u0433\u043e\u0432\u043e\u0440\u044f\u0442, \u043d\u0435 \u043f\u0440\u043e\u0442\u043e\u0431\u0430\u0444\u043e\u043c \u0435\u0434\u0438\u043d\u044b\u043c \u0436\u0438\u0432\u0435\u0442 gRPC. \u041d\u043e \u0437\u0434\u0435\u0441\u044c \u044f \u0431\u0443\u0434\u0443 \u043f\u0438\u0441\u0430\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u0440\u043e protobuf.<\/p>\n<p><strong>\u041a\u043e\u0433\u0434\u0430 \u043c\u043e\u0436\u0435\u0442 \u043f\u0440\u0438\u0433\u043e\u0434\u0438\u0442\u044c\u0441\u044f gRPC<\/strong><\/p>\n<ol>\n<li>\n<p>\u00a0\u0415\u0441\u043b\u0438 \u0432 \u043f\u0440\u043e\u0435\u043a\u0442\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u043c\u0438\u043a\u0440\u043e\u0441\u0435\u0440\u0432\u0438\u0441\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043e\u0431\u0449\u0430\u044e\u0442\u0441\u044f \u0434\u0440\u0443\u0433 \u0441 \u0434\u0440\u0443\u0433\u043e\u043c;<\/p>\n<\/li>\n<li>\n<p>\u0415\u0441\u043b\u0438 \u0432 \u043f\u0440\u043e\u0435\u043a\u0442\u0435 \u043c\u043d\u043e\u0433\u043e \u0440\u0430\u0437\u043d\u044b\u0445 \u0447\u0430\u0441\u0442\u0435\u0439 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u044b \u043d\u0430 \u0440\u0430\u0437\u043d\u044b\u0445 \u044f\u0437\u044b\u043a\u0430\u0445 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u2014\u00a0 \u0443 gRPC \u0435\u0441\u0442\u044c \u043a\u043e\u0434\u043e\u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u044f \u0434\u043b\u044f \u043c\u043d\u043e\u0433\u0438\u0445 \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u044b\u0445 \u044f\u0437\u044b\u043a\u043e\u0432;<\/p>\n<\/li>\n<li>\n<p>\u0415\u0441\u043b\u0438 \u0434\u0430\u043d\u043d\u044b\u0435 \u043d\u0430\u0434\u043e \u0441\u0442\u0440\u0438\u043c\u0438\u0442\u044c \u2014\u00a0gRPC \u0443\u043c\u0435\u0435\u0442 \u0441 \u044d\u0442\u0438\u043c \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b HTTP\/2, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u043b\u0435\u0433\u043a\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 \u043f\u043e\u0442\u043e\u043a\u0430\u043c\u0438;<\/p>\n<\/li>\n<li>\n<p>\u0415\u0441\u043b\u0438 \u0432\u0430\u0436\u043d\u0430 \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0438 \u2014 gRPC \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0431\u044b\u0441\u0442\u0440\u0435\u0435, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u0434\u0430\u043d\u043d\u044b\u0435 \u0434\u043b\u044f \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0438 \u0432 \u0431\u0438\u043d\u0430\u0440\u043d\u043e\u043c \u0432\u0438\u0434\u0435. \u0418 \u0435\u0449\u0451 \u0438\u0437-\u0437\u0430 \u0434\u0440\u0443\u0433\u0438\u0445 \u043d\u043e\u0432\u0448\u0435\u0441\u0442\u0432 HTTP\/2, \u043d\u043e \u0432 \u043d\u0438\u0445 \u043d\u0435 \u0431\u0443\u0434\u0435\u043c \u0443\u0433\u043b\u0443\u0431\u043b\u044f\u0442\u044c\u0441\u044f. <\/p>\n<\/li>\n<\/ol>\n<p><strong>\u0422\u0430\u043a \u043a\u0430\u043a \u0438\u043c\u0435\u043d\u043d\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 GRPC<\/strong>?<\/p>\n<p>\u0414\u0435\u043b\u0430\u0435\u043c \u043f\u0440\u043e\u0442\u043e-\u0437\u0430\u043f\u0440\u043e\u0441 \u0438 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u043f\u0440\u043e\u0442\u043e-\u043e\u0442\u0432\u0435\u0442. \u041f\u043e\u0445\u043e\u0436\u0435 \u043d\u0430 \u043f\u0440\u0438\u0432\u044b\u0447\u043d\u044b\u0439 \u0440\u0435\u0441\u0442? \u0414\u0430, \u0442\u043e\u043b\u044c\u043a\u043e \u0435\u0441\u0442\u044c \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u044c: \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u0435\u043c\u044b\u0435 \u0438 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u044e\u0442\u0441\u044f \u0432 \u0431\u0438\u043d\u0430\u0440\u043d\u043e\u043c \u0432\u0438\u0434\u0435, \u0430 \u043a\u043b\u044e\u0447\u0438 \u0434\u043b\u044f \u0434\u0430\u043d\u043d\u044b\u0445 \u2014 \u044d\u0442\u043e \u0438\u043d\u0434\u0435\u043a\u0441\u044b, \u0430 \u043d\u0435 \u043f\u0440\u0438\u0432\u044b\u0447\u043d\u044b\u0435 \u0432 \u0440\u0435\u0441\u0442\u0435 \u0438\u043c\u0435\u043d\u0430 \u043f\u043e\u043b\u0435\u0439. \u0422\u0430\u043a \u0447\u0442\u043e \u0434\u0430\u043d\u043d\u044b\u0435 \u043f\u0435\u0440\u0435\u0434\u0430\u044e\u0442\u0441\u044f \u0431\u044b\u0441\u0442\u0440\u043e, \u043d\u043e \u0432\u044b\u0433\u043b\u044f\u0434\u044f\u0442 \u043d\u0435\u043f\u043e\u043d\u044f\u0442\u043d\u043e \u0434\u043b\u044f \u0447\u0435\u043b\u043e\u0432\u0435\u043a\u0430, \u0431\u0443\u0434\u0443\u0447\u0438 \u0437\u0430\u0448\u0438\u0444\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u043c\u0438 \u0432 \u0431\u0438\u043d\u0430\u0440\u043d\u043e\u043c \u0432\u0438\u0434\u0435.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/4d0\/b63\/9cc\/4d0b639ccf89b19bda4eed6f265ef5bb.png\" alt=\"\u0421\u0445\u0435\u043c\u0430 \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u0442\u0430\u043a\u0430\u044f\" title=\"\u0421\u0445\u0435\u043c\u0430 \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u0442\u0430\u043a\u0430\u044f\" width=\"974\" height=\"667\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/4d0\/b63\/9cc\/4d0b639ccf89b19bda4eed6f265ef5bb.png\"\/><\/p>\n<div><figcaption>\u0421\u0445\u0435\u043c\u0430 \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u0442\u0430\u043a\u0430\u044f<\/figcaption><\/div>\n<\/figure>\n<p>\u041f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u044d\u0442\u043e\u0442 \u0442\u0435\u043a\u0441\u0442 \u043d\u0430\u043f\u0438\u0441\u0430\u043d \u0434\u043b\u044f \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0449\u0438\u043a\u043e\u0432, \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0442\u044c \u043a\u0430\u043a \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 \u043a\u043b\u0438\u0435\u043d\u0442\u043e\u043c gRPC, \u0430 \u0441\u0435\u0440\u0432\u0435\u0440 \u043f\u0438\u0441\u0430\u0442\u044c \u043d\u0435 \u0431\u0443\u0434\u0435\u043c.<\/p>\n<p><strong>\u0427\u0442\u043e\u0431\u044b \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 gRPC \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u0442\u0441\u044f :<\/strong><\/p>\n<ol>\n<li>\n<p>\u041f\u0440\u043e\u0442\u043e-\u0444\u0430\u0439\u043b (\u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0432\u044b\u0441\u0442\u0443\u043f\u0438\u0442 \u0434\u043b\u044f \u043d\u0430\u0441 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0435\u0439 \u043a\u0430\u043a\u0438\u0435 \u043f\u0440\u043e\u0442\u043e-\u0437\u0430\u043f\u0440\u043e\u0441\u044b \u0438 \u043f\u0440\u043e\u0442\u043e-\u043e\u0442\u0432\u0435\u0442\u044b \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u043f\u043e\u043b\u0443\u0447\u0430\u0442\u044c); <\/p>\n<\/li>\n<li>\n<p>\u0421\u0442\u0430\u0431 \u2014 \u044d\u0442\u043e \u043a\u043b\u0438\u0435\u043d\u0442 \u0434\u043b\u044f \u0441\u0435\u0440\u0432\u0438\u0441\u0430, \u043e\u043f\u0438\u0441\u0430\u043d\u043d\u043e\u0433\u043e \u0432 \u043f\u0440\u043e\u0442\u043e-\u0444\u0430\u0439\u043b\u0435. \u041c\u044b \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0435\u0433\u043e, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u043a\u043e\u0434\u043e\u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u044e gRPC, \u0438\u043b\u0438 \u0441\u0442\u0430\u0431\u043e\u043c \u0432\u044b\u0441\u0442\u0443\u043f\u0438\u0442 \u0441\u0430\u043c\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435, \u0447\u0435\u0440\u0435\u0437 \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043c\u044b \u0434\u0435\u043b\u0430\u0435\u043c \u0437\u0430\u043f\u0440\u043e\u0441;<\/p>\n<\/li>\n<li>\n<p>\u0410\u0434\u0440\u0435\u0441 API, \u043a\u0443\u0434\u0430 \u0431\u0443\u0434\u0435\u043c \u0441\u043b\u0430\u0442\u044c \u0437\u0430\u043f\u0440\u043e\u0441\u044b.<\/p>\n<\/li>\n<\/ol>\n<p><strong>\u0427\u0442\u043e \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0434\u043b\u044f \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f gRPC?<\/strong><\/p>\n<p>\u0422\u0440\u0430\u0434\u0438\u0446\u0438\u043e\u043d\u043d\u043e \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u044e\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c BloomRpc \u0434\u043b\u044f Windows. \u0412\u0441\u0435 \u043f\u0440\u043e\u0441\u0442\u043e: \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u0448\u044c \u043f\u0440\u043e\u0442\u043e-\u0444\u0430\u0439\u043b, \u0432\u0432\u043e\u0434\u0438\u0448\u044c \u0430\u0434\u0440\u0435\u0441 API. \u0412 \u043d\u0443\u0436\u043d\u043e\u043c \u0437\u0430\u043f\u0440\u043e\u0441\u0435 \u0434\u043e\u043f\u043e\u043b\u043d\u044f\u0435\u0448\u044c \u043f\u043e\u043b\u044f \u0434\u0430\u043d\u043d\u044b\u043c\u0438 \u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0448\u044c. \u041a\u043b\u0438\u0435\u043d\u0442 \u2014 \u0441\u0430\u043c\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 BloomRpc.<\/p>\n<p>\u0414\u043b\u044f MACos \u0435\u0441\u0442\u044c \u0434\u0440\u0443\u0433\u043e\u0439 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442, \u0442\u0430\u043a\u043e\u0439 \u0436\u0435 \u043f\u0440\u043e\u0441\u0442\u043e\u0439: grpc_clicker. \u0412\u043e\u0442 \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 <a href=\"https:\/\/github.com\/d1nch8g\/grpc_clicker\">\u0433\u0438\u0442\u0445\u0430\u0431 <\/a>\u0438 \u043d\u0430 <a href=\"https:\/\/marketplace.visualstudio.com\/items?itemName=Dancheg97.grpc-clicker\">\u043c\u0430\u0440\u043a\u0435\u0442\u043f\u043b\u0435\u0439\u0441 VSCode<\/a>. <\/p>\n<p>\u0415\u0449\u0451 \u0435\u0441\u0442\u044c \u043c\u0443\u043b\u044c\u0442\u0438\u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0435\u043d\u043d\u044b\u0439 Postman, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0442\u0435\u043f\u0435\u0440\u044c \u0442\u043e\u0436\u0435 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c gRPC.<\/p>\n<p>\u0415\u0441\u043b\u0438 \u0432\u044b \u043f\u043e\u0434\u0433\u0440\u0443\u0437\u0438\u043b\u0438 \u0444\u0430\u0439\u043b \u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0435 \u0437\u0430\u043f\u0440\u043e\u0441, \u043d\u043e \u0432\u0441\u0435 \u0440\u0430\u0432\u043d\u043e \u043d\u0438\u0447\u0435\u0433\u043e \u043d\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u2014 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u0434\u0435\u043b\u043e \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u0443 \u0432\u0430\u0441 \u043f\u0435\u0440\u0435\u0434 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435\u043c \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u044f \u0435\u0449\u0435 \u043a\u0430\u043a\u0438\u043c-\u043d\u0438\u0431\u0443\u0434\u044c API. \u0421\u0430\u043c\u044b\u0439 \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u0440\u0435\u0448\u0435\u043d\u0438\u044f: \u043e\u0442\u043a\u043b\u044e\u0447\u0438\u0442\u0435 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u044e \u0438 \u043f\u043e\u043f\u0440\u043e\u0431\u0443\u0439\u0442\u0435 \u0435\u0449\u0435 \u0440\u0430\u0437. \u0412\u0432\u043e\u0434 \u043f\u0430\u0440\u043e\u043b\u044f \u0438 \u043b\u043e\u0433\u0438\u043d\u0430, \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0435 \u0442\u043e\u043a\u0435\u043d\u0430 \u043f\u0435\u0440\u0435\u0434 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435\u043c \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u043f\u0440\u043e\u0431\u043e\u0432\u0430\u0442\u044c \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u0432 Postman, \u043d\u043e \u044d\u0442\u043e \u0442\u0440\u0443\u0434\u043e\u0451\u043c\u043a\u0438\u0439 \u043f\u0440\u043e\u0446\u0435\u0441\u0441.<\/p>\n<h2>\u0418 \u043a \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0435<\/h2>\n<p>\u041f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u043c \u043a \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044e \u0430\u0432\u0442\u043e\u0442\u0435\u0441\u0442\u043e\u0432. \u0421 \u043d\u0443\u043b\u044f \u0438 \u043f\u043e\u0448\u0430\u0433\u043e\u0432\u043e!<\/p>\n<p>\u041c\u044b \u0431\u0443\u0434\u0435\u043c \u043f\u0438\u0441\u0430\u0442\u044c \u0430\u0432\u0442\u043e\u0442\u0435\u0441\u0442\u044b \u043f\u043e \u043f\u0440\u043e\u0442\u043e-\u0444\u0430\u0439\u043b\u0443 Dogs \u0432\u043e\u0442 <a href=\"https:\/\/github.com\/grpc\/grpc-kotlin\/tree\/master\/examples\/protos\/src\/main\/proto\/io\/grpc\/examples\/animals\">\u043e\u0442\u0441\u044e\u0434\u0430<\/a>, \u043d\u0430 \u044f\u0437\u044b\u043a\u0435 <strong>Kotlin<\/strong>. \u0410 \u0434\u043b\u044f \u0441\u0431\u043e\u0440\u043a\u0438 \u0431\u0443\u0434\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c Spring Boot \u0438 Gradle.<\/p>\n<ol>\n<li>\n<p><strong>\u041f\u0440\u0435\u0434\u0432\u0430\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u0430\u044f \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430<\/strong><\/p>\n<\/li>\n<\/ol>\n<p>\u041e\u0442\u043a\u0440\u044b\u0432\u0430\u0435\u043c InteliIjIDE. \u0412\u044b\u0431\u0438\u0440\u0430\u0435\u043c Console Application \u0438 11 \u0432\u0435\u0440\u0441\u0438\u044e Java. \u0412 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0441\u0431\u043e\u0440\u0449\u0438\u043a\u0430 \u0431\u0443\u0434\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c Gradle.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/5ec\/28d\/7b5\/5ec28d7b507c0aa0e2bd2f120ca063db.png\" width=\"974\" height=\"490\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/5ec\/28d\/7b5\/5ec28d7b507c0aa0e2bd2f120ca063db.png\"\/><\/figure>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/1f0\/a17\/2a4\/1f0a172a4c4f0560a9d3e4a368b4e04b.png\" width=\"974\" height=\"492\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/1f0\/a17\/2a4\/1f0a172a4c4f0560a9d3e4a368b4e04b.png\"\/><\/figure>\n<p>\u0423\u0440\u0430, \u0437\u0430\u0433\u043e\u0442\u043e\u0432\u043a\u0430 \u0435\u0441\u0442\u044c. \u0422\u0435\u043f\u0435\u0440\u044c \u0436\u0434\u0435\u043c \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0432\u0440\u0435\u043c\u044f, \u043f\u043e\u043a\u0430 \u043f\u0440\u043e\u0435\u043a\u0442 \u0441\u043e\u0431\u0438\u0440\u0430\u0435\u0442\u0441\u044f (\u0432\u043d\u0438\u0437\u0443 \u0441\u043f\u0440\u0430\u0432\u0430 Gradle Build \u0441 \u043f\u043e\u043b\u043e\u0441\u043e\u0439 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438):<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/136\/444\/2fb\/1364442fb6f9bcfcbc7122a67bffbd70.png\" width=\"974\" height=\"656\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/136\/444\/2fb\/1364442fb6f9bcfcbc7122a67bffbd70.png\"\/><\/figure>\n<p>\u041f\u043e\u0441\u043b\u0435 \u0442\u043e\u0433\u043e \u043a\u0430\u043a \u0432\u0441\u0435 \u0441\u043e\u0431\u0440\u0430\u043b\u043e\u0441\u044c \u2014 \u0434\u0435\u043b\u0430\u0435\u043c Package.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/8ec\/c2f\/1f4\/8ecc2f1f4104328dba943453bc0cd452.png\" width=\"974\" height=\"652\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/8ec\/c2f\/1f4\/8ecc2f1f4104328dba943453bc0cd452.png\"\/><\/figure>\n<p>\u0418 \u043f\u0435\u0440\u0435\u0442\u0430\u0441\u043a\u0438\u0432\u0430\u0435\u043c \u0432 \u043d\u0435\u0433\u043e Main.kt. \u042d\u0442\u043e \u043d\u0443\u0436\u043d\u043e \u0434\u043b\u044f \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e\u0433\u043e \u0437\u0430\u043f\u0443\u0441\u043a\u0430.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/dea\/324\/4d7\/dea3244d7cf8089e4bb248f94e522f6d.png\" width=\"974\" height=\"653\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/dea\/324\/4d7\/dea3244d7cf8089e4bb248f94e522f6d.png\"\/><\/figure>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043f\u043e\u043c\u0435\u043d\u044f\u0435\u043c \u043a\u043e\u0434 \u0432 \u043d\u0430\u0448\u0435\u043c \u0444\u0430\u0439\u043b\u0435 <strong>main<\/strong>. \u041e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u0442\u0430\u043a:<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/83e\/55c\/ee1\/83e55cee1b5acb15db534f9c563abdaa.png\" width=\"974\" height=\"658\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/83e\/55c\/ee1\/83e55cee1b5acb15db534f9c563abdaa.png\"\/><\/figure>\n<p>\u0410 \u043c\u0435\u043d\u044f\u0435\u043c \u043c\u044b \u0435\u0433\u043e \u0432\u043e\u0442 \u043d\u0430 \u044d\u0442\u043e:<\/p>\n<pre><code>package t  import org.springframework.beans.factory.annotation.Value import org.springframework.boot.CommandLineRunner import org.springframework.boot.autoconfigure.SpringBootApplication import org.springframework.boot.runApplication  @SpringBootApplication class DogsTestApp() : CommandLineRunner {     companion object {         @JvmStatic         fun main(args: Array&lt;String>) {             runApplication&lt;DogsTestApp>(*args)         }     }     override fun run(vararg args: String?) {     } }<\/code><\/pre>\n<p>\u041c\u044b \u0431\u0443\u0434\u0435\u043c \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f SpringBoot. \u0414\u0430\u043b\u044c\u0448\u0435 \u043c\u044b \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u043c \u044d\u0442\u043e\u0442 \u0444\u0430\u0439\u043b, \u043d\u043e \u043f\u043e\u043a\u0430 \u043e\u0441\u0442\u0430\u0432\u0438\u043c \u0442\u0430\u043a\u0443\u044e \u0437\u0430\u0433\u043e\u0442\u043e\u0432\u043a\u0443.<\/p>\n<p>\u041d\u0430 \u044d\u0442\u043e\u043c \u044d\u0442\u0430\u043f\u0435 \u0441\u0434\u0435\u043b\u0430\u0435\u043c \u043f\u0430\u043f\u043a\u0443 proto, \u0433\u0434\u0435 \u0431\u0443\u0434\u0435\u043c \u0445\u0440\u0430\u043d\u0438\u0442\u044c \u043d\u0430\u0448\u0438 \u043f\u0440\u043e\u0442\u043e-\u0444\u0430\u0439\u043b\u044b.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/ebc\/d0c\/be9\/ebcd0cbe9a812cc7c97a36c51773beb6.png\" width=\"974\" height=\"648\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/ebc\/d0c\/be9\/ebcd0cbe9a812cc7c97a36c51773beb6.png\"\/><\/figure>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/eb9\/cba\/537\/eb9cba537c7fa6925c0f6e510e390c0b.png\" width=\"974\" height=\"651\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/eb9\/cba\/537\/eb9cba537c7fa6925c0f6e510e390c0b.png\"\/><\/figure>\n<p>\u041f\u043e\u043c\u0435\u0449\u0430\u0435\u043c \u0442\u0443\u0434\u0430 \u043d\u0430\u0448 \u043f\u0440\u043e\u0442\u043e-\u0444\u0430\u0439\u043b:<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/d2d\/e50\/9fe\/d2de509feb41026a60ef3cacdcd42993.png\" width=\"974\" height=\"659\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/d2d\/e50\/9fe\/d2de509feb41026a60ef3cacdcd42993.png\"\/><\/figure>\n<p>\u0418 \u0432\u043e\u0442 \u0442\u0430\u043a \u043e\u043d \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442:<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/4ed\/e82\/0ea\/4ede820ea6d09309e4c872806dbbaa9f.png\" width=\"974\" height=\"654\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/4ed\/e82\/0ea\/4ede820ea6d09309e4c872806dbbaa9f.png\"\/><\/figure>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0438\u0434\u0451\u043c \u0432 \u0444\u0430\u0439\u043b build.gradle.kts:<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/a3d\/876\/d4d\/a3d876d4d00c87b495295e6bf42327ad.png\" width=\"974\" height=\"651\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/a3d\/876\/d4d\/a3d876d4d00c87b495295e6bf42327ad.png\"\/><\/figure>\n<p>\u0421\u0435\u0439\u0447\u0430\u0441 \u0432 \u043d\u0435\u043c \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u043a\u043e\u0434, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u044b \u0437\u0430\u043c\u0435\u043d\u0438\u043c \u043a\u043e\u0434\u043e\u043c \u043d\u0438\u0436\u0435. \u0412 \u044d\u0442\u043e\u043c \u0444\u0430\u0439\u043b\u0435 \u043c\u044b \u043f\u0440\u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u043c, \u043a\u0430\u043a\u0438\u0435 \u0438\u043c\u0435\u043d\u043d\u043e \u0432\u0435\u0440\u0441\u0438\u0438 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u044b. \u041e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435, \u0447\u0442\u043e \u0437\u0434\u0435\u0441\u044c \u043d\u0430\u0434\u043e \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 Package, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u044b \u0441\u043e\u0437\u0434\u0430\u043b\u0438 \u0432 \u043d\u0430\u0447\u0430\u043b\u0435, \u0432 \u044d\u0442\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0435 \u201cgroup= &#171;t&#187;\u201d.<\/p>\n<p>\u0418 \u0435\u0449\u0435 \u0437\u0434\u0435\u0441\u044c \u043c\u044b \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c \u043a\u043b\u0430\u0441\u0441, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u0434\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0434\u043b\u044f \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f<\/p>\n<p><code>springBoot{ mainClass.set(\"t.DogsTestApp\")<\/code><\/p>\n<p>\u041a\u043e\u0434, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0437\u0430\u043c\u0435\u043d\u0438\u0442 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439:<\/p>\n<pre><code>import com.google.protobuf.gradle.id import org.jetbrains.kotlin.gradle.tasks.KotlinCompile  plugins{ id(\"org.springframework.boot\")version\"2.7.0\"     id(\"io.spring.dependency-management\")version\"1.1.0\"     id(\"com.google.protobuf\")version\"0.9.2\" kotlin(\"jvm\")version\"1.7.22\" kotlin(\"plugin.spring\")version\"1.7.22\" }  group= \"t\" version= \"0.0.1-SNAPSHOT\" java.sourceCompatibility= JavaVersion.VERSION_11  ext[\"grpcKotlin\"] = \"1.3.0\" ext[\"grpcVersion\"] = \"1.53.0\" ext[\"protobufVersion\"] = \"3.22.0\"  repositories{ mavenCentral() }  springBoot{ mainClass.set(\"t.DogsTestApp\") }  protobuf{ protoc{ artifact = \"com.google.protobuf:protoc:${rootProject.ext[\"protobufVersion\"]}\" } plugins{ id(\"grpc\"){ artifact = \"io.grpc:protoc-gen-grpc-java:${rootProject.ext[\"grpcVersion\"]}\" } id(\"grpckt\"){ artifact = \"io.grpc:protoc-gen-grpc-kotlin:${rootProject.ext[\"grpcKotlin\"]}:jdk8@jar\" }     } generateProtoTasks{ all().forEach{ it.plugins{ id(\"grpc\")                 id(\"grpckt\") } it.builtins{ id(\"kotlin\") }         }     } }   dependencies{ implementation(\"org.springframework.boot:spring-boot-starter\") implementation(\"net.devh:grpc-client-spring-boot-starter:2.14.0.RELEASE\") implementation(\"org.jetbrains.kotlin:kotlin-reflect\") implementation(\"org.jetbrains.kotlin:kotlin-stdlib-jdk8\") implementation(\"io.grpc:grpc-kotlin-stub:${rootProject.ext[\"grpcKotlin\"]}\") implementation(\"io.grpc:grpc-protobuf:${rootProject.ext[\"grpcVersion\"]}\") implementation(\"com.google.protobuf:protobuf-kotlin:${rootProject.ext[\"protobufVersion\"]}\") implementation(\"com.google.protobuf:protobuf-java:${rootProject.ext[\"protobufVersion\"]}\") runtimeOnly(\"io.grpc:grpc-netty-shaded:${rootProject.ext[\"grpcVersion\"]}\") compileOnly(\"org.apache.tomcat:annotations-api:6.0.53\") testImplementation(\"org.springframework.boot:spring-boot-starter-test\") }  tasks.withType&lt;KotlinCompile>{ kotlinOptions.jvmTarget = \"1.8\" }   tasks.withType&lt;Test>{ useJUnitPlatform() } <\/code><\/pre>\n<p>\u0415\u0441\u043b\u0438 \u0432\u044b \u0441\u0434\u0435\u043b\u0430\u043b\u0438 \u0432\u0441\u0451 \u043e\u043f\u0438\u0441\u0430\u043d\u043d\u043e\u0435 \u0432\u044b\u0448\u0435, \u0442\u043e \u043d\u0430 \u044d\u0442\u043e\u043c \u044d\u0442\u0430\u043f\u0435 \u0443 \u0432\u0430\u0441 \u0434\u043e\u043b\u0436\u043d\u044b \u043f\u043e\u044f\u0432\u0438\u0442\u044c\u0441\u044f \u0432\u043e\u0442 \u0442\u0430\u043a\u0438\u0435 \u0437\u043d\u0430\u0447\u043a\u0438. \u041e\u043d\u0438 \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u044e\u0442, \u0447\u0442\u043e \u043d\u0430\u0434\u043e \u043f\u043e\u0434\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u0444\u0430\u0439\u043b\u044b \u0438 \u0441\u043e\u0431\u0440\u0430\u0442\u044c \u043f\u0440\u043e\u0435\u043a\u0442 \u0437\u0430\u043d\u043e\u0432\u043e.<\/p>\n<figure class=\"\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/aa8\/caa\/7a6\/aa8caa7a6c5aa14b0f9c200f65fea3e9.png\" width=\"458\" height=\"248\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/aa8\/caa\/7a6\/aa8caa7a6c5aa14b0f9c200f65fea3e9.png\"\/><\/figure>\n<p>\u041d\u0430\u0436\u0438\u043c\u0430\u0435\u043c \u0441\u043f\u0435\u0440\u0432\u0430 \u043d\u0430 \u043e\u0434\u0438\u043d \u0437\u043d\u0430\u0447\u043e\u043a \u0444\u0430\u0439\u043b\u0430, \u0437\u0430\u0442\u0435\u043c \u043d\u0430 \u0434\u0440\u0443\u0433\u043e\u0439 (\u043d\u0430 \u0441\u043b\u043e\u043d\u0430). \u041c\u044b \u0438\u0437\u043c\u0435\u043d\u0438\u043b\u0438 \u0444\u0430\u0439\u043b \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043a, \u0438 \u0442\u0435\u043f\u0435\u0440\u044c \u044d\u0442\u0438 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0434\u043e\u043b\u0436\u043d\u044b \u0432\u0441\u0442\u0443\u043f\u0438\u0442\u044c \u0432 \u0441\u0438\u043b\u0443 \u0441 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u043e\u0439 \u043d\u0443\u0436\u043d\u044b\u0445 \u043d\u0430\u043c \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a.<\/p>\n<p>\u041f\u043e\u0441\u043b\u0435 \u0442\u043e\u0433\u043e \u043a\u0430\u043a \u0432\u0441\u0435 \u043f\u043e\u0434\u0433\u0440\u0443\u0437\u0438\u0442\u0441\u044f, \u043a\u0440\u0430\u0441\u043d\u044b\u0439 \u0442\u0435\u043a\u0441\u0442 (\u043d\u0430 \u0441\u043a\u0440\u0438\u043d\u0435) \u043f\u0440\u043e\u043f\u0430\u0434\u0435\u0442.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/a56\/542\/5c6\/a565425c6099b37f4db0c2c44ab5a250.png\" width=\"974\" height=\"654\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/a56\/542\/5c6\/a565425c6099b37f4db0c2c44ab5a250.png\"\/><\/figure>\n<p>\u0414\u0430\u043b\u0435\u0435 \u0438\u0434\u0435\u043c \u0432 settings.gradle.kts.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/539\/89a\/68f\/53989a68f559e55023209cdaa8f7235f.png\" width=\"974\" height=\"659\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/539\/89a\/68f\/53989a68f559e55023209cdaa8f7235f.png\"\/><\/figure>\n<p>\u0417\u0434\u0435\u0441\u044c \u043c\u044b \u043f\u0438\u0448\u0435\u043c, \u0447\u0442\u043e \u0441\u043e\u0437\u0434\u0430\u043b\u0438 \u043f\u0430\u043f\u043a\u0443 \u0441 \u043f\u0440\u043e\u0442\u043e-\u0444\u0430\u0439\u043b\u0430\u043c\u0438 \u0438 \u0435\u0451 \u0442\u043e\u0436\u0435 \u0431\u0443\u0434\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043a\u0430\u043a \u0447\u0430\u0441\u0442\u044c \u043f\u0440\u043e\u0435\u043a\u0442\u0430. \u0417\u0430\u0442\u0435\u043c \u043e\u043f\u044f\u0442\u044c \u043f\u0435\u0440\u0435\u0441\u043e\u0431\u0438\u0440\u0430\u0435\u043c \u043f\u0440\u043e\u0435\u043a\u0442, \u043d\u0430\u0436\u0430\u0432 \u043d\u0430 \u0443\u0436\u0435 \u0437\u043d\u0430\u043a\u043e\u043c\u044b\u0439 \u0437\u043d\u0430\u0447\u043e\u043a \u0441\u043b\u043e\u043d\u0430.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/e31\/0b5\/42f\/e310b542fa484c517099e11b7d9d0cf7.png\" width=\"974\" height=\"620\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/e31\/0b5\/42f\/e310b542fa484c517099e11b7d9d0cf7.png\"\/><\/figure>\n<ol start=\"2\">\n<li>\n<p><strong>\u0421\u043e\u0437\u0434\u0430\u0451\u043c \u043a\u043b\u0438\u0435\u043d\u0442\u0430<\/strong><\/p>\n<p>\u0421\u043e\u0437\u0434\u0430\u0451\u043c new package service, \u0430 \u0432 \u043d\u0451\u043c \u2014 new Kotlin class \u043f\u043e\u0434 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435\u043c DogsClientService. \u0412 \u0443\u0447\u0435\u0431\u043d\u044b\u0445 \u0446\u0435\u043b\u044f\u0445 \u0431\u0443\u0434\u0435\u043c \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0442\u044c \u0441\u0438\u043c\u0443\u043b\u044f\u0442\u043e\u0440 \u0441\u043e\u0431\u0430\u043a\u0438. \u0414\u0430.<\/p>\n<\/li>\n<\/ol>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/b13\/305\/52e\/b1330552ef229103f3d0471dd7c3b6ab.png\" width=\"974\" height=\"654\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/b13\/305\/52e\/b1330552ef229103f3d0471dd7c3b6ab.png\"\/><\/figure>\n<figure class=\"float full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/4bc\/a3a\/c30\/4bca3ac30c85165fb5508c8c7d12aeb4.png\" width=\"974\" height=\"1508\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/4bc\/a3a\/c30\/4bca3ac30c85165fb5508c8c7d12aeb4.png\"\/><\/figure>\n<p>\u0422\u0430\u043a\u0436\u0435 \u043d\u0435 \u0437\u0430\u0431\u0443\u0434\u0435\u043c \u043d\u0430 \u044d\u0442\u043e\u043c \u0448\u0430\u0433\u0435 \u0441\u0431\u0438\u043b\u0434\u0438\u0442\u044c \u043f\u0440\u043e\u0442\u043e-\u0444\u0430\u0439\u043b\u044b, \u0447\u0442\u043e\u0431\u044b \u043d\u0430\u043c \u0443\u0434\u043e\u0431\u043d\u0435\u0435 \u0431\u044b\u043b\u043e \u043f\u0438\u0441\u0430\u0442\u044c \u0430\u0432\u0442\u043e\u0442\u0435\u0441\u0442, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u0438\u0445. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043d\u0443\u0436\u043d\u043e \u0441\u043f\u0435\u0440\u0432\u0430 \u043e\u0442\u043a\u0440\u044b\u0442\u044c Gradle \u0441\u0431\u043e\u043a\u0443 \u0438 \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0434\u0432\u043e\u0439\u043d\u043e\u0439 \u043a\u043b\u0438\u043a \u043d\u0430 clean. \u0410 \u0437\u0430\u0442\u0435\u043c \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0434\u0432\u043e\u0439\u043d\u043e\u0439 \u043a\u043b\u0438\u043a \u043d\u0430 build.<\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u043c\u0441\u044f \u043a DogsClientService, \u0434\u0435\u043b\u0430\u0435\u043c \u0438\u043c\u043f\u043e\u0440\u0442\u044b \u0438 \u043d\u043e\u0442\u0430\u0446\u0438\u0438<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/e9a\/851\/d2f\/e9a851d2f9aff2084cdae0f961c80b99.png\" width=\"974\" height=\"817\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/e9a\/851\/d2f\/e9a851d2f9aff2084cdae0f961c80b99.png\"\/><\/figure>\n<p>\u0418 \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u043c \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0442\u044c \u043d\u0430\u0448 \u0441\u0442\u0430\u0431. \u041f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u043c\u044b \u0441\u0431\u0438\u043b\u0434\u0438\u043b\u0438 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e Gradle \u043d\u0430\u0448\u0438 \u043f\u0440\u043e\u0442\u043e- \u0444\u0430\u0439\u043b\u044b (\u044d\u0442\u043e \u043c\u043e\u0436\u043d\u043e \u0443\u0432\u0438\u0434\u0435\u0442\u044c, \u0435\u0441\u043b\u0438 \u043e\u0442\u043a\u0440\u044b\u0442\u044c \u0441\u0431\u043e\u043a\u0443 extracted-protos ), \u043c\u044b \u0443\u0432\u0438\u0434\u0438\u043c \u043f\u043e\u044f\u0432\u043b\u0435\u043d\u0438\u0435 \u043d\u0430\u0448\u0435\u0433\u043e DoggRPC.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/4f8\/df0\/b6e\/4f8df0b6e3de3497177da6634e93b303.png\" width=\"974\" height=\"524\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/4f8\/df0\/b6e\/4f8df0b6e3de3497177da6634e93b303.png\"\/><\/figure>\n<p>\u0418 \u0437\u043d\u0430\u0447\u0438\u0442 \u0442\u0435\u043f\u0435\u0440\u044c, \u0431\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u044f \u043a\u043e\u0434\u043e\u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438, \u0443 \u043d\u0430\u0441 \u0431\u0443\u0434\u0443\u0442 \u043f\u043e\u044f\u0432\u043b\u044f\u0442\u044c\u0441\u044f \u043f\u043e\u0434\u0441\u043a\u0430\u0437\u043a\u0438!<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/cb6\/003\/2d1\/cb60032d1ae6869664ddffadc740f3bd.png\" width=\"974\" height=\"518\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/cb6\/003\/2d1\/cb60032d1ae6869664ddffadc740f3bd.png\"\/><\/figure>\n<p>\u0412\u044b\u0431\u0438\u0440\u0430\u0435\u043c BlockingStub, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u0443 \u043d\u0430\u0441 \u043e\u0431\u044b\u0447\u043d\u044b\u0439 \u0437\u0430\u043f\u0440\u043e\u0441, \u043d\u0435 \u043f\u043e\u0442\u043e\u043a\u043e\u0432\u044b\u0439 \u0438 \u043d\u0435 \u0430\u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u044b\u0439. \u041d\u0438\u0436\u0435 \u043c\u044b \u043e\u043f\u0438\u0441\u0430\u043b\u0438, \u0447\u0442\u043e \u044d\u0442\u043e\u0442 \u043a\u043b\u0438\u0435\u043d\u0442 \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u043c \u0434\u043b\u044f \u0433\u0430\u0432\u043a\u0430\u043d\u044c\u044f:<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/be9\/2bc\/0a0\/be92bc0a096c6491c09cf1e31b4b3ef6.png\" width=\"974\" height=\"519\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/be9\/2bc\/0a0\/be92bc0a096c6491c09cf1e31b4b3ef6.png\"\/><\/figure>\n<p>\u0410 \u0437\u0430\u043f\u0440\u043e\u0441 \u0438 \u043e\u0442\u0432\u0435\u0442 \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u044b \u043d\u0430\u043c \u0438\u0437 \u043f\u0440\u043e\u0442\u043e-\u0444\u0430\u0439\u043b\u0430. <\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/cbb\/9d7\/1d6\/cbb9d71d6323b5bab70bf3b60c6d306a.png\" width=\"974\" height=\"181\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/cbb\/9d7\/1d6\/cbb9d71d6323b5bab70bf3b60c6d306a.png\"\/><\/figure>\n<p>\u0424\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438, \u043c\u044b \u043d\u0430\u043f\u0438\u0441\u0430\u043b\u0438, \u0447\u0442\u043e \u043d\u0430\u0448 \u043a\u043b\u0438\u0435\u043d\u0442 \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 \u044d\u0442\u0438\u043c \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u043c.<\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0441\u0434\u0435\u043b\u0430\u0435\u043c \u043a\u043b\u0430\u0441\u0441 DogSteps, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u043d\u0430\u043f\u0438\u0448\u0435\u043c \u043c\u0435\u0442\u043e\u0434, \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u044e\u0449\u0438\u0439 \u043d\u0430\u0448 \u0437\u0430\u043f\u0440\u043e\u0441 \u0434\u043b\u044f \u0433\u0430\u0432\u043a\u0430\u043d\u044c\u044f makeBark.<\/p>\n<p>\u0421\u0435\u0439\u0447\u0430\u0441 \u0443 \u043d\u0430\u0441 \u043e\u0447\u0435\u043d\u044c \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u0432\u044b\u0437\u043e\u0432 \u043c\u0435\u0442\u043e\u0434\u0430 API \u0441 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u043c \u0431\u0435\u0437 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0441\u0442\u0440\u043e\u0447\u043a\u0438 11 \u0438 13 \u043a\u0430\u0436\u0443\u0442\u0441\u044f \u0438\u0437\u0431\u044b\u0442\u043e\u0447\u043d\u044b\u043c\u0438, \u043d\u043e \u0432 \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0438\u0445 \u043f\u0440\u0438\u043c\u0435\u0440\u0430\u0445 \u043c\u044b \u0443\u0432\u0438\u0434\u0438\u043c, \u0447\u0442\u043e \u0437\u0434\u0435\u0441\u044c \u043c\u043e\u0436\u0435\u043c \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u0432 \u043d\u0430\u0448 request .<\/p>\n<p>\u0410 \u043f\u043e\u043a\u0430 \u0434\u0435\u043b\u0430\u0435\u043c \u0435\u0433\u043e \u0442\u0430\u043a\u0438\u043c \u0438 \u043d\u0430 14 \u0441\u0442\u0440\u043e\u043a\u0435 \u043f\u0438\u0448\u0435\u043c \u0432\u044b\u0437\u043e\u0432 \u043c\u0435\u0442\u043e\u0434\u0430 API barkRequest, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043d\u0430\u043f\u0438\u0441\u0430\u043b\u0438 \u0432 \u043a\u043b\u0438\u0435\u043d\u0442\u0435 DogsClientService (\u043e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435, \u0447\u0442\u043e \u0432 7 \u0441\u0442\u0440\u043e\u043a\u0435 \u043c\u044b \u0441\u043e\u0437\u0434\u0430\u043b\u0438 \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440 \u044d\u0442\u043e\u0433\u043e \u043a\u043b\u0438\u0435\u043d\u0442\u0430) \u0441 \u043d\u0430\u0448\u0438\u043c \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u043c request2. \u0418 \u043a\u043b\u0430\u0434\u0435\u043c \u0435\u0433\u043e \u0432 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e getResponse \u2014  \u0434\u0430\u043d\u043d\u044b\u0435, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043d\u0430\u043c \u043f\u0440\u0438\u0434\u0443\u0442 \u043f\u043e\u0441\u043b\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0437\u0430\u043f\u0440\u043e\u0441\u0430.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/493\/92d\/8a6\/49392d8a6dee0f10da22dc91bbbf8886.png\" width=\"974\" height=\"524\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/493\/92d\/8a6\/49392d8a6dee0f10da22dc91bbbf8886.png\"\/><\/figure>\n<p>\u0418\u0434\u0435\u043c \u0432 Main.kt \u0438 \u0434\u0435\u043b\u0430\u0435\u043c \u0438\u043c\u043f\u043e\u0440\u0442 \u043a\u043e\u043c\u0430\u043d\u0434\u043e\u0439<code>import t.DogSteps. <\/code><\/p>\n<p>\u0417\u0430\u0442\u0435\u043c \u0434\u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u043c \u0432 DogsTestApp \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e \u0432\u043d\u0443\u0442\u0440\u0438 \u0441\u043a\u043e\u0431\u043e\u043a (private val mydogSteps:DogSteps) \u0438 \u043f\u0435\u0440\u0435\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u043c \u043c\u0435\u0442\u043e\u0434 run, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u043c\u044b \u0447\u0435\u0440\u0435\u0437 \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u0443\u044e \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e mydogStep \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u0432\u044b\u0437\u043e\u0432 \u043c\u0435\u0442\u043e\u0434\u0430 MakeBark.<\/p>\n<p>\u041e\u0441\u0442\u0430\u0451\u0442\u0441\u044f \u0437\u0430\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u043d\u0430\u0448 \u0432\u044b\u0437\u043e\u0432 \u043c\u0435\u0442\u043e\u0434\u0430 \u0432 try catch, \u0447\u0442\u043e\u0431\u044b \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u0443\u0432\u0438\u0434\u0435\u0442\u044c \u043e\u0448\u0438\u0431\u043a\u0438, \u0435\u0441\u043b\u0438 \u0437\u0430\u043f\u0440\u043e\u0441 \u043d\u0435 \u0441\u043c\u043e\u0436\u0435\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c\u0441\u044f.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/593\/721\/1ce\/5937211ce95f4156db74d2b43111b57c.png\" width=\"974\" height=\"533\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/593\/721\/1ce\/5937211ce95f4156db74d2b43111b57c.png\"\/><\/figure>\n<p>\u0418 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0439 \u0448\u0430\u0433 \u2014\u00a0 \u0432 resources \u0441\u043e\u0437\u0434\u0430\u0435\u043c \u0444\u0430\u0439\u043b <a href=\"http:\/\/application.properties\">application.properties<\/a>, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u043f\u0438\u0448\u0435\u043c \u0430\u0434\u0440\u0435\u0441, \u0433\u0434\u0435 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f API, \u043a \u043a\u043e\u0442\u043e\u0440\u043e\u043c\u0443 \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u043e\u0431\u0440\u0430\u0449\u0430\u0442\u044c\u0441\u044f.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/d2b\/1b4\/c13\/d2b1b4c135622f86ed61881c3222052d.png\" width=\"974\" height=\"533\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/d2b\/1b4\/c13\/d2b1b4c135622f86ed61881c3222052d.png\"\/><\/figure>\n<p>\u0418 \u0442\u0435\u043f\u0435\u0440\u044c \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u043d\u0430\u0448 API-\u0442\u0435\u0441\u0442, \u043d\u0430\u0436\u0430\u0432 \u043d\u0430 \u0437\u0435\u043b\u0435\u043d\u0443\u044e \u0441\u0442\u0440\u0435\u043b\u043a\u0443!<\/p>\n<p>\u041f\u0440\u0430\u0432\u0434\u0430 \u0441\u0435\u0439\u0447\u0430\u0441 \u043e\u043d \u0443 \u043d\u0430\u0441 \u043d\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u0441\u044f, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u0430\u0434\u0440\u0435\u0441 static:\/\/your_name:1234 \u043d\u0435 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0432 \u0441\u0435\u0431\u0435 \u0440\u0443\u0447\u043a\u0443 \u043d\u0430\u0448\u0435\u0433\u043e API. \u0427\u0442\u043e\u0431\u044b \u0443\u0432\u0438\u0434\u0435\u0442\u044c \u0437\u0430\u043f\u0443\u0441\u043a \u043f\u0440\u0438\u0434\u0435\u0442\u0441\u044f \u043f\u043e\u0434\u043d\u0438\u043c\u0430\u0442\u044c \u0443 \u0441\u0435\u0431\u044f \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e API \u0441 \u043d\u0430\u0448\u0438\u043c \u043f\u0440\u043e\u0442\u043e-\u0444\u0430\u0439\u043b\u043e\u043c \u0438\u043b\u0438, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u044d\u0442\u043e\u0442 \u043f\u0440\u0438\u043c\u0435\u0440 \u043a\u0430\u043a \u043e\u0441\u043d\u043e\u0432\u0443, \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0437\u0430\u043f\u0440\u043e\u0441 \u043a \u0441\u0432\u043e\u0435\u043c\u0443 API, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0432\u044b \u0442\u0435\u0441\u0442\u0438\u0440\u0443\u0435\u0442\u0435.<\/p>\n<ol start=\"3\">\n<li>\n<p><strong>\u041f\u043e\u043b\u0435\u0437\u043d\u044b\u0435 \u0441\u043e\u0432\u0435\u0442\u044b.<\/strong> <\/p>\n<\/li>\n<\/ol>\n<p><strong>3.1. \u0414\u043b\u044f \u0441\u043b\u043e\u0436\u043d\u044b\u0445 \u043c\u0435\u0441\u0441\u0430\u0434\u0436\u0435\u0439 \u0432 \u043f\u0440\u043e\u0442\u043e-\u0444\u0430\u0439\u043b\u0435.<\/strong> <\/p>\n<p>\u0412\u043e\u0437\u044c\u043c\u0451\u043c \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0439<code> message BarkRequest {}<\/code>\u0438 \u0434\u043e\u043f\u0438\u0448\u0435\u043c \u0432 \u043d\u0435\u0433\u043e \u0443\u0442\u043e\u0447\u043d\u044f\u044e\u0449\u0438\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u2014\u00a0  \u043a\u0442\u043e \u0433\u0430\u0432\u043a\u0430\u0435\u0442, \u0433\u0434\u0435, \u043f\u043e\u0447\u0435\u043c\u0443 \u0438 \u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0440\u0430\u0437 (\u0438 \u043d\u0435 \u0437\u0430\u0431\u0443\u0434\u044c\u0442\u0435 \u043f\u0435\u0440\u0435\u0441\u043e\u0431\u0440\u0430\u0442\u044c \u0447\u0435\u0440\u0435\u0437 Gradle clean \u0438 \u0437\u0430\u0442\u0435\u043c build). <\/p>\n<pre><code>message BarkRequest {  string whoBark = 1;  string whereBark = 2;  string whyBark = 3;  int howManyTimesBark = 4;  }<\/code><\/pre>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/4fd\/c20\/653\/4fdc206537a94af72960478161caa55b.png\" width=\"974\" height=\"454\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/4fd\/c20\/653\/4fdc206537a94af72960478161caa55b.png\"\/><\/figure>\n<p>\u0418\u0434\u0451\u043c \u0432 DogSteps, \u0438 \u0442\u0435\u043f\u0435\u0440\u044c \u043d\u0430\u0448 \u0437\u0430\u043f\u0440\u043e\u0441 \u0431\u0443\u0434\u0435\u0442 \u043d\u0435 \u0442\u0430\u043a\u043e\u0439 \u043f\u0440\u043e\u0441\u0442\u043e\u0439, \u043a\u0430\u043a \u0440\u0430\u043d\u044c\u0448\u0435 \u2014\u00a0 \u043c\u044b \u0443\u0432\u0438\u0434\u0438\u043c \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u043d\u044b\u0435 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u044b \u043c\u0435\u0442\u043e\u0434\u043e\u0432 \u0437\u0430\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u044b\u0445 \u043f\u043e\u043b\u0435\u0439.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/892\/a60\/44b\/892a6044be97273602d853d38e7350d2.png\" width=\"974\" height=\"520\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/892\/a60\/44b\/892a6044be97273602d853d38e7350d2.png\"\/><\/figure>\n<p>\u0414\u043e\u043f\u0438\u0448\u0435\u043c \u0432 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u043c\u0435\u0442\u043e\u0434\u0430, \u0447\u0442\u043e \u0431\u0443\u0434\u0435\u043c \u043e\u0436\u0438\u0434\u0430\u0442\u044c \u044d\u0442\u0438 \u0434\u0430\u043d\u043d\u044b\u0435 \u0434\u043b\u044f \u0437\u0430\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u043f\u043e\u043b\u0435\u0439 \u0438 \u0432 request1. \u0410 \u0434\u0430\u043b\u044c\u0448\u0435 \u0432\u0441\u0435 \u043a\u0430\u043a \u043f\u0440\u0435\u0436\u0434\u0435.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/842\/e40\/5cb\/842e405cb41c25f54fd75c94fe6ba9f1.png\" width=\"974\" height=\"757\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/842\/e40\/5cb\/842e405cb41c25f54fd75c94fe6ba9f1.png\"\/><\/figure>\n<p>\u0418 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c \u0434\u0430\u043d\u043d\u044b\u0435 \u043f\u0440\u0438 \u0432\u044b\u0437\u043e\u0432\u0435:<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/1a8\/cef\/e98\/1a8cefe98b554f102d4db00b8d4ba44f.png\" width=\"974\" height=\"202\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/1a8\/cef\/e98\/1a8cefe98b554f102d4db00b8d4ba44f.png\"\/><\/figure>\n<p><strong>3.2. Assertion.<\/strong><\/p>\n<p>\u0411\u0435\u0437 Assertion \u0430\u0432\u0442\u043e\u0442\u0435\u0441\u0442\u044b \u043d\u0435 \u043e\u0431\u0445\u043e\u0434\u044f\u0442\u0441\u044f, \u0438 \u0432 \u043d\u0430\u0448\u0435\u0439 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0442\u0430\u043a\u0443\u044e \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443:<\/p>\n<pre><code>import org.hamcrest.MatcherAssert import org.hamcrest.core.Is<\/code><\/pre>\n<p>\u0418 \u043f\u0440\u0438\u043c\u0435\u0440 \u0435\u0451 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f:<\/p>\n<pre><code>val sendingPeriod = myConstantForCheck val a = somePage.sendingPeriod.text var b = a.replaceAfter(\" \", \"\") println(b.toString()) println(\"ffffff\") MatcherAssert.assertThat(     \"is equal\",     b,     Is.`is`(sendingPeriod + \" \") ) <\/code><\/pre>\n<p><strong>3.3. log info<\/strong><\/p>\n<p>\u0412\u044b\u0432\u043e\u0434 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 \u043a\u043e\u043d\u0441\u043e\u043b\u044c \u0442\u043e\u0436\u0435 \u043e\u0447\u0435\u043d\u044c \u043f\u043e\u043b\u0435\u0437\u0435\u043d. \u041f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0435\u043c:<\/p>\n<pre><code>import org.slf4j.LoggerFactory private val log = LoggerFactory.getLogger(*javaClass*)<\/code><\/pre>\n<p>\u0418 \u043f\u0430\u0440\u0430 \u043f\u0440\u0438\u043c\u0435\u0440\u043e\u0432 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f:<\/p>\n<pre><code># \u041f\u0435\u0440\u0432\u044b\u0439 log.info(request2.*whoBark*.toString())  # \u0412\u0442\u043e\u0440\u043e\u0439 log.info(getResponse.*message*.toString())<\/code><\/pre>\n<p>3.4. <strong>\u0410 \u0435\u0441\u043b\u0438 \u043d\u0430\u0448\u0435 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u0434\u0440\u0443\u0433\u043e\u0435 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435?<\/strong><\/p>\n<p>\u0414\u043e\u043f\u0443\u0441\u0442\u0438\u043c, \u043d\u0430\u0448 \u043f\u0440\u043e\u0442\u043e-\u0444\u0430\u0439\u043b \u0431\u044b \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u043b \u0435\u0449\u0435 \u0441\u043b\u043e\u0436\u043d\u0435\u0435. \u0421 \u043d\u043e\u0432\u044b\u043c \u043c\u0435\u0441\u0441\u0430\u0434\u0436\u0435\u043c PlayRequest.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/d18\/098\/32b\/d1809832bb478aa79406f16b2ed78d0e.png\" width=\"974\" height=\"1195\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/d18\/098\/32b\/d1809832bb478aa79406f16b2ed78d0e.png\"\/><\/figure>\n<p>\u0415\u0441\u043b\u0438 \u043d\u0430\u0448 \u0437\u0430\u043f\u0440\u043e\u0441 \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u043d\u0435 \u043f\u0440\u043e\u0441\u0442\u043e \u0438\u0437 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f, \u0430 \u0438\u0437 \u0432\u043b\u043e\u0436\u0435\u043d\u043d\u044b\u0445 \u043c\u0435\u0441\u0441\u0430\u0434\u0436\u0435\u0439, \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043f\u0430\u0442\u0442\u0435\u0440\u043d \u0444\u0430\u0431\u0440\u0438\u043a\u0438 \u0434\u043b\u044f \u0437\u0430\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0437\u0430\u043f\u0440\u043e\u0441\u0430. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0441\u0434\u0435\u043b\u0430\u0435\u043c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u043a\u043b\u0430\u0441\u0441.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/22b\/d88\/dd9\/22bd88dd90552a77952532b6e8d56fa6.png\" width=\"974\" height=\"439\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/22b\/d88\/dd9\/22bd88dd90552a77952532b6e8d56fa6.png\"\/><\/figure>\n<p>\u0410 \u0432 DogsClientService \u0434\u043e\u043f\u0438\u0448\u0435\u043c \u043c\u0435\u0442\u043e\u0434 \u0434\u043b\u044f \u043d\u043e\u0432\u043e\u0433\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u0430 playRequest.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/60c\/099\/264\/60c099264e7f4a23de9f6eb46ff28ef8.png\" width=\"974\" height=\"949\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/60c\/099\/264\/60c099264e7f4a23de9f6eb46ff28ef8.png\"\/><\/figure>\n<p>\u0418 \u0442\u0435\u043f\u0435\u0440\u044c \u0432 DogSteps \u0432\u043e\u0442 \u0442\u0430\u043a \u0437\u0430\u043f\u043e\u043b\u043d\u0438\u043c \u043d\u0430\u0448 \u0437\u0430\u043f\u0440\u043e\u0441<sub>, <\/sub>\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u044b\u0439 \u043a\u043b\u0430\u0441\u0441 toyFactory.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/e44\/f4b\/aab\/e44f4baab1109fa0876f849a7e4a52df.png\" width=\"974\" height=\"649\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/e44\/f4b\/aab\/e44f4baab1109fa0876f849a7e4a52df.png\"\/><\/figure>\n<h2>\u042d\u043f\u0438\u043b\u043e\u0433<\/h2>\n<p>\u041d\u0430 \u0441\u0435\u0433\u043e\u0434\u043d\u044f \u0432\u0441\u0451! \u0421\u043f\u0430\u0441\u0438\u0431\u043e, \u0447\u0442\u043e \u043f\u0440\u043e\u0448\u043b\u0438 \u044d\u0442\u043e\u0442 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u044b\u0439 \u0433\u0430\u0439\u0434 \u0432\u043c\u0435\u0441\u0442\u0435 \u0441 \u043d\u0430\u043c\u0438, \u0438 \u0434\u0430\u0439\u0442\u0435 \u0437\u043d\u0430\u0442\u044c, \u0435\u0441\u043b\u0438 \u0445\u043e\u0442\u0438\u0442\u0435 \u0431\u043e\u043b\u044c\u0448\u0435 \u043f\u043e\u0434\u043e\u0431\u043d\u044b\u0445 \u043c\u0430\u0442\u0435\u0440\u0438\u0430\u043b\u043e\u0432 \ud83d\ude42<\/p>\n<\/p>\n<\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/div>\n<p><!----><!----><br \/> \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\/articles\/792168\/\"> https:\/\/habr.com\/ru\/articles\/792168\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u0412\u0441\u0435\u043c \u043f\u0440\u0438\u0432\u0435\u0442! \u041c\u0435\u043d\u044f \u0437\u043e\u0432\u0443\u0442 \u041a\u0430\u0442\u044f \u041c\u0443\u043b\u0438\u0447\u0435\u0432\u0430, \u044f \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0449\u0438\u0446\u0430 \u0432 \u0421\u0418\u0411\u0423\u0420 \u0414\u0438\u0434\u0436\u0438\u0442\u0430\u043b. \u041f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0435 \u0434\u0432\u0430 \u0433\u043e\u0434\u0430 \u044f \u043f\u0438\u0448\u0443 \u0430\u0432\u0442\u043e\u0442\u0435\u0441\u0442\u044b \u0434\u043b\u044f gRPC \u043d\u0430 Kotlin. \u041f\u043e\u043b\u0443\u0447\u0438\u0432 \u043e\u043f\u044b\u0442, \u044f \u0437\u0430\u0445\u043e\u0442\u0435\u043b\u0430 \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0441\u0442\u0430\u0442\u044c\u044e, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043e\u0447\u0435\u043d\u044c \u043f\u0440\u0438\u0433\u043e\u0434\u0438\u043b\u0430\u0441\u044c \u0431\u044b \u043c\u043d\u0435 \u0441\u0430\u043c\u043e\u0439, \u043a\u043e\u0433\u0434\u0430 \u044f \u0442\u043e\u043b\u044c\u043a\u043e \u043d\u0430\u0447\u0438\u043d\u0430\u043b\u0430 \u0440\u0430\u0437\u0431\u0438\u0440\u0430\u0442\u044c\u0441\u044f \u0441 gRPC. \u041d\u0430\u0434\u0435\u044e\u0441\u044c, \u0432\u044b \u043d\u0430\u0439\u0434\u0435\u0442\u0435 \u0435\u0451 \u043f\u043e\u043b\u0435\u0437\u043d\u043e\u0439 \u0434\u043b\u044f \u0441\u0435\u0431\u044f!<\/p>\n<h2>\u041d\u0435\u043c\u043d\u043e\u0433\u043e \u0442\u0435\u043e\u0440\u0438\u0438<\/h2>\n<p><strong>\u0414\u043b\u044f \u0447\u0435\u0433\u043e \u043d\u0443\u0436\u0435\u043d API<\/strong><\/p>\n<p>\u041d\u0430\u0447\u043d\u0451\u043c \u0441 \u043e\u0441\u043d\u043e\u0432. \u0423 \u043d\u0430\u0441 \u0435\u0441\u0442\u044c \u0441\u0435\u0440\u0432\u0438\u0441\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u044b \u043d\u0430 \u0440\u0430\u0437\u043d\u044b\u0445 \u044f\u0437\u044b\u043a\u0430\u0445 \u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0440\u0430\u0437\u043d\u044b\u0435 \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u044b. \u0427\u0442\u043e\u0431\u044b \u043e\u043d\u0438 \u043c\u043e\u0433\u043b\u0438 \u043c\u0435\u0436\u0434\u0443 \u0441\u043e\u0431\u043e\u0439 \u043e\u0431\u0449\u0430\u0442\u044c\u0441\u044f, \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u0441\u043f\u043e\u0441\u043e\u0431 \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0438 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439. \u041e\u0434\u0438\u043d \u0438\u0437 \u0442\u0430\u043a\u0438\u0445 \u0441\u043f\u043e\u0441\u043e\u0431\u043e\u0432 \u2014 RPC \u0438 \u0435\u0433\u043e \u043c\u043e\u0434\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u044f \u043e\u0442 Google \u2014 gRPC.<\/p>\n<p>gRPC \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u0434\u043b\u044f \u043e\u0431\u0449\u0435\u043d\u0438\u044f \u0444\u043e\u0440\u043c\u0430\u0442 <strong>protobuf<\/strong>, \u0442\u0430\u043a\u0436\u0435 \u043f\u0440\u0438\u0434\u0443\u043c\u0430\u043d\u043d\u044b\u0439 Google. \u0425\u043e\u0442\u044f \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0438 \u0434\u0440\u0443\u0433\u0438\u0435 \u0444\u043e\u0440\u043c\u0430\u0442\u044b \u2014\u00a0 \u0433\u043e\u0432\u043e\u0440\u044f\u0442, \u043d\u0435 \u043f\u0440\u043e\u0442\u043e\u0431\u0430\u0444\u043e\u043c \u0435\u0434\u0438\u043d\u044b\u043c \u0436\u0438\u0432\u0435\u0442 gRPC. \u041d\u043e \u0437\u0434\u0435\u0441\u044c \u044f \u0431\u0443\u0434\u0443 \u043f\u0438\u0441\u0430\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u0440\u043e protobuf.<\/p>\n<p><strong>\u041a\u043e\u0433\u0434\u0430 \u043c\u043e\u0436\u0435\u0442 \u043f\u0440\u0438\u0433\u043e\u0434\u0438\u0442\u044c\u0441\u044f gRPC<\/strong><\/p>\n<ol>\n<li>\n<p>\u00a0\u0415\u0441\u043b\u0438 \u0432 \u043f\u0440\u043e\u0435\u043a\u0442\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u043c\u0438\u043a\u0440\u043e\u0441\u0435\u0440\u0432\u0438\u0441\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043e\u0431\u0449\u0430\u044e\u0442\u0441\u044f \u0434\u0440\u0443\u0433 \u0441 \u0434\u0440\u0443\u0433\u043e\u043c;<\/p>\n<\/li>\n<li>\n<p>\u0415\u0441\u043b\u0438 \u0432 \u043f\u0440\u043e\u0435\u043a\u0442\u0435 \u043c\u043d\u043e\u0433\u043e \u0440\u0430\u0437\u043d\u044b\u0445 \u0447\u0430\u0441\u0442\u0435\u0439 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u044b \u043d\u0430 \u0440\u0430\u0437\u043d\u044b\u0445 \u044f\u0437\u044b\u043a\u0430\u0445 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u2014\u00a0 \u0443 gRPC \u0435\u0441\u0442\u044c \u043a\u043e\u0434\u043e\u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u044f \u0434\u043b\u044f \u043c\u043d\u043e\u0433\u0438\u0445 \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u044b\u0445 \u044f\u0437\u044b\u043a\u043e\u0432;<\/p>\n<\/li>\n<li>\n<p>\u0415\u0441\u043b\u0438 \u0434\u0430\u043d\u043d\u044b\u0435 \u043d\u0430\u0434\u043e \u0441\u0442\u0440\u0438\u043c\u0438\u0442\u044c \u2014\u00a0gRPC \u0443\u043c\u0435\u0435\u0442 \u0441 \u044d\u0442\u0438\u043c \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b HTTP\/2, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u043b\u0435\u0433\u043a\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 \u043f\u043e\u0442\u043e\u043a\u0430\u043c\u0438;<\/p>\n<\/li>\n<li>\n<p>\u0415\u0441\u043b\u0438 \u0432\u0430\u0436\u043d\u0430 \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0438 \u2014 gRPC \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0431\u044b\u0441\u0442\u0440\u0435\u0435, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u0434\u0430\u043d\u043d\u044b\u0435 \u0434\u043b\u044f \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0438 \u0432 \u0431\u0438\u043d\u0430\u0440\u043d\u043e\u043c \u0432\u0438\u0434\u0435. \u0418 \u0435\u0449\u0451 \u0438\u0437-\u0437\u0430 \u0434\u0440\u0443\u0433\u0438\u0445 \u043d\u043e\u0432\u0448\u0435\u0441\u0442\u0432 HTTP\/2, \u043d\u043e \u0432 \u043d\u0438\u0445 \u043d\u0435 \u0431\u0443\u0434\u0435\u043c \u0443\u0433\u043b\u0443\u0431\u043b\u044f\u0442\u044c\u0441\u044f. <\/p>\n<\/li>\n<\/ol>\n<p><strong>\u0422\u0430\u043a \u043a\u0430\u043a \u0438\u043c\u0435\u043d\u043d\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 GRPC<\/strong>?<\/p>\n<p>\u0414\u0435\u043b\u0430\u0435\u043c \u043f\u0440\u043e\u0442\u043e-\u0437\u0430\u043f\u0440\u043e\u0441 \u0438 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u043f\u0440\u043e\u0442\u043e-\u043e\u0442\u0432\u0435\u0442. \u041f\u043e\u0445\u043e\u0436\u0435 \u043d\u0430 \u043f\u0440\u0438\u0432\u044b\u0447\u043d\u044b\u0439 \u0440\u0435\u0441\u0442? \u0414\u0430, \u0442\u043e\u043b\u044c\u043a\u043e \u0435\u0441\u0442\u044c \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u044c: \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u0435\u043c\u044b\u0435 \u0438 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u044e\u0442\u0441\u044f \u0432 \u0431\u0438\u043d\u0430\u0440\u043d\u043e\u043c \u0432\u0438\u0434\u0435, \u0430 \u043a\u043b\u044e\u0447\u0438 \u0434\u043b\u044f \u0434\u0430\u043d\u043d\u044b\u0445 \u2014 \u044d\u0442\u043e \u0438\u043d\u0434\u0435\u043a\u0441\u044b, \u0430 \u043d\u0435 \u043f\u0440\u0438\u0432\u044b\u0447\u043d\u044b\u0435 \u0432 \u0440\u0435\u0441\u0442\u0435 \u0438\u043c\u0435\u043d\u0430 \u043f\u043e\u043b\u0435\u0439. \u0422\u0430\u043a \u0447\u0442\u043e \u0434\u0430\u043d\u043d\u044b\u0435 \u043f\u0435\u0440\u0435\u0434\u0430\u044e\u0442\u0441\u044f \u0431\u044b\u0441\u0442\u0440\u043e, \u043d\u043e \u0432\u044b\u0433\u043b\u044f\u0434\u044f\u0442 \u043d\u0435\u043f\u043e\u043d\u044f\u0442\u043d\u043e \u0434\u043b\u044f \u0447\u0435\u043b\u043e\u0432\u0435\u043a\u0430, \u0431\u0443\u0434\u0443\u0447\u0438 \u0437\u0430\u0448\u0438\u0444\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u043c\u0438 \u0432 \u0431\u0438\u043d\u0430\u0440\u043d\u043e\u043c \u0432\u0438\u0434\u0435.<\/p>\n<figure class=\"full-width\">\n<div><figcaption>\u0421\u0445\u0435\u043c\u0430 \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u0442\u0430\u043a\u0430\u044f<\/figcaption><\/div>\n<\/figure>\n<p>\u041f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u044d\u0442\u043e\u0442 \u0442\u0435\u043a\u0441\u0442 \u043d\u0430\u043f\u0438\u0441\u0430\u043d \u0434\u043b\u044f \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0449\u0438\u043a\u043e\u0432, \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0442\u044c \u043a\u0430\u043a \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 \u043a\u043b\u0438\u0435\u043d\u0442\u043e\u043c gRPC, \u0430 \u0441\u0435\u0440\u0432\u0435\u0440 \u043f\u0438\u0441\u0430\u0442\u044c \u043d\u0435 \u0431\u0443\u0434\u0435\u043c.<\/p>\n<p><strong>\u0427\u0442\u043e\u0431\u044b \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 gRPC \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u0442\u0441\u044f :<\/strong><\/p>\n<ol>\n<li>\n<p>\u041f\u0440\u043e\u0442\u043e-\u0444\u0430\u0439\u043b (\u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0432\u044b\u0441\u0442\u0443\u043f\u0438\u0442 \u0434\u043b\u044f \u043d\u0430\u0441 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0435\u0439 \u043a\u0430\u043a\u0438\u0435 \u043f\u0440\u043e\u0442\u043e-\u0437\u0430\u043f\u0440\u043e\u0441\u044b \u0438 \u043f\u0440\u043e\u0442\u043e-\u043e\u0442\u0432\u0435\u0442\u044b \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u043f\u043e\u043b\u0443\u0447\u0430\u0442\u044c); <\/p>\n<\/li>\n<li>\n<p>\u0421\u0442\u0430\u0431 \u2014 \u044d\u0442\u043e \u043a\u043b\u0438\u0435\u043d\u0442 \u0434\u043b\u044f \u0441\u0435\u0440\u0432\u0438\u0441\u0430, \u043e\u043f\u0438\u0441\u0430\u043d\u043d\u043e\u0433\u043e \u0432 \u043f\u0440\u043e\u0442\u043e-\u0444\u0430\u0439\u043b\u0435. \u041c\u044b \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0435\u0433\u043e, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u043a\u043e\u0434\u043e\u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u044e gRPC, \u0438\u043b\u0438 \u0441\u0442\u0430\u0431\u043e\u043c \u0432\u044b\u0441\u0442\u0443\u043f\u0438\u0442 \u0441\u0430\u043c\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435, \u0447\u0435\u0440\u0435\u0437 \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043c\u044b \u0434\u0435\u043b\u0430\u0435\u043c \u0437\u0430\u043f\u0440\u043e\u0441;<\/p>\n<\/li>\n<li>\n<p>\u0410\u0434\u0440\u0435\u0441 API, \u043a\u0443\u0434\u0430 \u0431\u0443\u0434\u0435\u043c \u0441\u043b\u0430\u0442\u044c \u0437\u0430\u043f\u0440\u043e\u0441\u044b.<\/p>\n<\/li>\n<\/ol>\n<p><strong>\u0427\u0442\u043e \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0434\u043b\u044f \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f gRPC?<\/strong><\/p>\n<p>\u0422\u0440\u0430\u0434\u0438\u0446\u0438\u043e\u043d\u043d\u043e \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u044e\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c BloomRpc \u0434\u043b\u044f Windows. \u0412\u0441\u0435 \u043f\u0440\u043e\u0441\u0442\u043e: \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u0448\u044c \u043f\u0440\u043e\u0442\u043e-\u0444\u0430\u0439\u043b, \u0432\u0432\u043e\u0434\u0438\u0448\u044c \u0430\u0434\u0440\u0435\u0441 API. \u0412 \u043d\u0443\u0436\u043d\u043e\u043c \u0437\u0430\u043f\u0440\u043e\u0441\u0435 \u0434\u043e\u043f\u043e\u043b\u043d\u044f\u0435\u0448\u044c \u043f\u043e\u043b\u044f \u0434\u0430\u043d\u043d\u044b\u043c\u0438 \u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0448\u044c. \u041a\u043b\u0438\u0435\u043d\u0442 \u2014 \u0441\u0430\u043c\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 BloomRpc.<\/p>\n<p>\u0414\u043b\u044f MACos \u0435\u0441\u0442\u044c \u0434\u0440\u0443\u0433\u043e\u0439 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442, \u0442\u0430\u043a\u043e\u0439 \u0436\u0435 \u043f\u0440\u043e\u0441\u0442\u043e\u0439: grpc_clicker. \u0412\u043e\u0442 \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 <a href=\"https:\/\/github.com\/d1nch8g\/grpc_clicker\">\u0433\u0438\u0442\u0445\u0430\u0431 <\/a>\u0438 \u043d\u0430 <a href=\"https:\/\/marketplace.visualstudio.com\/items?itemName=Dancheg97.grpc-clicker\">\u043c\u0430\u0440\u043a\u0435\u0442\u043f\u043b\u0435\u0439\u0441 VSCode<\/a>. <\/p>\n<p>\u0415\u0449\u0451 \u0435\u0441\u0442\u044c \u043c\u0443\u043b\u044c\u0442\u0438\u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0435\u043d\u043d\u044b\u0439 Postman, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0442\u0435\u043f\u0435\u0440\u044c \u0442\u043e\u0436\u0435 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c gRPC.<\/p>\n<p>\u0415\u0441\u043b\u0438 \u0432\u044b \u043f\u043e\u0434\u0433\u0440\u0443\u0437\u0438\u043b\u0438 \u0444\u0430\u0439\u043b \u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0435 \u0437\u0430\u043f\u0440\u043e\u0441, \u043d\u043e \u0432\u0441\u0435 \u0440\u0430\u0432\u043d\u043e \u043d\u0438\u0447\u0435\u0433\u043e \u043d\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u2014 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u0434\u0435\u043b\u043e \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u0443 \u0432\u0430\u0441 \u043f\u0435\u0440\u0435\u0434 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435\u043c \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u044f \u0435\u0449\u0435 \u043a\u0430\u043a\u0438\u043c-\u043d\u0438\u0431\u0443\u0434\u044c API. \u0421\u0430\u043c\u044b\u0439 \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u0440\u0435\u0448\u0435\u043d\u0438\u044f: \u043e\u0442\u043a\u043b\u044e\u0447\u0438\u0442\u0435 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u044e \u0438 \u043f\u043e\u043f\u0440\u043e\u0431\u0443\u0439\u0442\u0435 \u0435\u0449\u0435 \u0440\u0430\u0437. \u0412\u0432\u043e\u0434 \u043f\u0430\u0440\u043e\u043b\u044f \u0438 \u043b\u043e\u0433\u0438\u043d\u0430, \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0435 \u0442\u043e\u043a\u0435\u043d\u0430 \u043f\u0435\u0440\u0435\u0434 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435\u043c \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u043f\u0440\u043e\u0431\u043e\u0432\u0430\u0442\u044c \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u0432 Postman, \u043d\u043e \u044d\u0442\u043e \u0442\u0440\u0443\u0434\u043e\u0451\u043c\u043a\u0438\u0439 \u043f\u0440\u043e\u0446\u0435\u0441\u0441.<\/p>\n<h2>\u0418 \u043a \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0435<\/h2>\n<p>\u041f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u043c \u043a \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044e \u0430\u0432\u0442\u043e\u0442\u0435\u0441\u0442\u043e\u0432. \u0421 \u043d\u0443\u043b\u044f \u0438 \u043f\u043e\u0448\u0430\u0433\u043e\u0432\u043e!<\/p>\n<p>\u041c\u044b \u0431\u0443\u0434\u0435\u043c \u043f\u0438\u0441\u0430\u0442\u044c \u0430\u0432\u0442\u043e\u0442\u0435\u0441\u0442\u044b \u043f\u043e \u043f\u0440\u043e\u0442\u043e-\u0444\u0430\u0439\u043b\u0443 Dogs \u0432\u043e\u0442 <a href=\"https:\/\/github.com\/grpc\/grpc-kotlin\/tree\/master\/examples\/protos\/src\/main\/proto\/io\/grpc\/examples\/animals\">\u043e\u0442\u0441\u044e\u0434\u0430<\/a>, \u043d\u0430 \u044f\u0437\u044b\u043a\u0435 <strong>Kotlin<\/strong>. \u0410 \u0434\u043b\u044f \u0441\u0431\u043e\u0440\u043a\u0438 \u0431\u0443\u0434\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c Spring Boot \u0438 Gradle.<\/p>\n<ol>\n<li>\n<p><strong>\u041f\u0440\u0435\u0434\u0432\u0430\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u0430\u044f \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430<\/strong><\/p>\n<\/li>\n<\/ol>\n<p>\u041e\u0442\u043a\u0440\u044b\u0432\u0430\u0435\u043c InteliIjIDE. \u0412\u044b\u0431\u0438\u0440\u0430\u0435\u043c Console Application \u0438 11 \u0432\u0435\u0440\u0441\u0438\u044e Java. \u0412 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0441\u0431\u043e\u0440\u0449\u0438\u043a\u0430 \u0431\u0443\u0434\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c Gradle.<\/p>\n<figure class=\"full-width\"><\/figure>\n<figure class=\"full-width\"><\/figure>\n<p>\u0423\u0440\u0430, \u0437\u0430\u0433\u043e\u0442\u043e\u0432\u043a\u0430 \u0435\u0441\u0442\u044c. \u0422\u0435\u043f\u0435\u0440\u044c \u0436\u0434\u0435\u043c \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0432\u0440\u0435\u043c\u044f, \u043f\u043e\u043a\u0430 \u043f\u0440\u043e\u0435\u043a\u0442 \u0441\u043e\u0431\u0438\u0440\u0430\u0435\u0442\u0441\u044f (\u0432\u043d\u0438\u0437\u0443 \u0441\u043f\u0440\u0430\u0432\u0430 Gradle Build \u0441 \u043f\u043e\u043b\u043e\u0441\u043e\u0439 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438):<\/p>\n<figure class=\"full-width\"><\/figure>\n<p>\u041f\u043e\u0441\u043b\u0435 \u0442\u043e\u0433\u043e \u043a\u0430\u043a \u0432\u0441\u0435 \u0441\u043e\u0431\u0440\u0430\u043b\u043e\u0441\u044c \u2014 \u0434\u0435\u043b\u0430\u0435\u043c Package.<\/p>\n<figure class=\"full-width\"><\/figure>\n<p>\u0418 \u043f\u0435\u0440\u0435\u0442\u0430\u0441\u043a\u0438\u0432\u0430\u0435\u043c \u0432 \u043d\u0435\u0433\u043e Main.kt. \u042d\u0442\u043e \u043d\u0443\u0436\u043d\u043e \u0434\u043b\u044f \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e\u0433\u043e \u0437\u0430\u043f\u0443\u0441\u043a\u0430.<\/p>\n<figure class=\"full-width\"><\/figure>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043f\u043e\u043c\u0435\u043d\u044f\u0435\u043c \u043a\u043e\u0434 \u0432 \u043d\u0430\u0448\u0435\u043c \u0444\u0430\u0439\u043b\u0435 <strong>main<\/strong>. \u041e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u0442\u0430\u043a:<\/p>\n<figure class=\"full-width\"><\/figure>\n<p>\u0410 \u043c\u0435\u043d\u044f\u0435\u043c \u043c\u044b \u0435\u0433\u043e \u0432\u043e\u0442 \u043d\u0430 \u044d\u0442\u043e:<\/p>\n<pre><code>package t  import org.springframework.beans.factory.annotation.Value import org.springframework.boot.CommandLineRunner import org.springframework.boot.autoconfigure.SpringBootApplication import org.springframework.boot.runApplication  @SpringBootApplication class DogsTestApp() : CommandLineRunner {     companion object {         @JvmStatic         fun main(args: Array&lt;String>) {             runApplication&lt;DogsTestApp>(*args)         }     }     override fun run(vararg args: String?) {     } }<\/code><\/pre>\n<p>\u041c\u044b \u0431\u0443\u0434\u0435\u043c \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f SpringBoot. \u0414\u0430\u043b\u044c\u0448\u0435 \u043c\u044b \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u043c \u044d\u0442\u043e\u0442 \u0444\u0430\u0439\u043b, \u043d\u043e \u043f\u043e\u043a\u0430 \u043e\u0441\u0442\u0430\u0432\u0438\u043c \u0442\u0430\u043a\u0443\u044e \u0437\u0430\u0433\u043e\u0442\u043e\u0432\u043a\u0443.<\/p>\n<p>\u041d\u0430 \u044d\u0442\u043e\u043c \u044d\u0442\u0430\u043f\u0435 \u0441\u0434\u0435\u043b\u0430\u0435\u043c \u043f\u0430\u043f\u043a\u0443 proto, \u0433\u0434\u0435 \u0431\u0443\u0434\u0435\u043c \u0445\u0440\u0430\u043d\u0438\u0442\u044c \u043d\u0430\u0448\u0438 \u043f\u0440\u043e\u0442\u043e-\u0444\u0430\u0439\u043b\u044b.<\/p>\n<figure class=\"full-width\"><\/figure>\n<figure class=\"full-width\"><\/figure>\n<p>\u041f\u043e\u043c\u0435\u0449\u0430\u0435\u043c \u0442\u0443\u0434\u0430 \u043d\u0430\u0448 \u043f\u0440\u043e\u0442\u043e-\u0444\u0430\u0439\u043b:<\/p>\n<figure class=\"full-width\"><\/figure>\n<p>\u0418 \u0432\u043e\u0442 \u0442\u0430\u043a \u043e\u043d \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442:<\/p>\n<figure class=\"full-width\"><\/figure>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0438\u0434\u0451\u043c \u0432 \u0444\u0430\u0439\u043b build.gradle.kts:<\/p>\n<figure class=\"full-width\"><\/figure>\n<p>\u0421\u0435\u0439\u0447\u0430\u0441 \u0432 \u043d\u0435\u043c \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u043a\u043e\u0434, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u044b \u0437\u0430\u043c\u0435\u043d\u0438\u043c \u043a\u043e\u0434\u043e\u043c \u043d\u0438\u0436\u0435. \u0412 \u044d\u0442\u043e\u043c \u0444\u0430\u0439\u043b\u0435 \u043c\u044b \u043f\u0440\u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u043c, \u043a\u0430\u043a\u0438\u0435 \u0438\u043c\u0435\u043d\u043d\u043e \u0432\u0435\u0440\u0441\u0438\u0438 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u044b. \u041e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435, \u0447\u0442\u043e \u0437\u0434\u0435\u0441\u044c \u043d\u0430\u0434\u043e \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 Package, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u044b \u0441\u043e\u0437\u0434\u0430\u043b\u0438 \u0432 \u043d\u0430\u0447\u0430\u043b\u0435, \u0432 \u044d\u0442\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0435 \u201cgroup= &#171;t&#187;\u201d.<\/p>\n<p>\u0418 \u0435\u0449\u0435 \u0437\u0434\u0435\u0441\u044c \u043c\u044b \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c \u043a\u043b\u0430\u0441\u0441, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u0434\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0434\u043b\u044f \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f<\/p>\n<p><code>springBoot{ mainClass.set(\"t.DogsTestApp\")<\/code><\/p>\n<p>\u041a\u043e\u0434, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0437\u0430\u043c\u0435\u043d\u0438\u0442 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439:<\/p>\n<pre><code>import com.google.protobuf.gradle.id import org.jetbrains.kotlin.gradle.tasks.KotlinCompile  plugins{ id(\"org.springframework.boot\")version\"2.7.0\"     id(\"io.spring.dependency-management\")version\"1.1.0\"     id(\"com.google.protobuf\")version\"0.9.2\" kotlin(\"jvm\")version\"1.7.22\" kotlin(\"plugin.spring\")version\"1.7.22\" }  group= \"t\" version= \"0.0.1-SNAPSHOT\" java.sourceCompatibility= JavaVersion.VERSION_11  ext[\"grpcKotlin\"] = \"1.3.0\" ext[\"grpcVersion\"] = \"1.53.0\" ext[\"protobufVersion\"] = \"3.22.0\"  repositories{ mavenCentral() }  springBoot{ mainClass.set(\"t.DogsTestApp\") }  protobuf{ protoc{ artifact = \"com.google.protobuf:protoc:${rootProject.ext[\"protobufVersion\"]}\" } plugins{ id(\"grpc\"){ artifact = \"io.grpc:protoc-gen-grpc-java:${rootProject.ext[\"grpcVersion\"]}\" } id(\"grpckt\"){ artifact = \"io.grpc:protoc-gen-grpc-kotlin:${rootProject.ext[\"grpcKotlin\"]}:jdk8@jar\" }     } generateProtoTasks{ all().forEach{ it.plugins{ id(\"grpc\")                 id(\"grpckt\") } it.builtins{ id(\"kotlin\") }         }     } }   dependencies{ implementation(\"org.springframework.boot:spring-boot-starter\") implementation(\"net.devh:grpc-client-spring-boot-starter:2.14.0.RELEASE\") implementation(\"org.jetbrains.kotlin:kotlin-reflect\") implementation(\"org.jetbrains.kotlin:kotlin-stdlib-jdk8\") implementation(\"io.grpc:grpc-kotlin-stub:${rootProject.ext[\"grpcKotlin\"]}\") implementation(\"io.grpc:grpc-protobuf:${rootProject.ext[\"grpcVersion\"]}\") implementation(\"com.google.protobuf:protobuf-kotlin:${rootProject.ext[\"protobufVersion\"]}\") implementation(\"com.google.protobuf:protobuf-java:${rootProject.ext[\"protobufVersion\"]}\") runtimeOnly(\"io.grpc:grpc-netty-shaded:${rootProject.ext[\"grpcVersion\"]}\") compileOnly(\"org.apache.tomcat:annotations-api:6.0.53\") testImplementation(\"org.springframework.boot:spring-boot-starter-test\") }  tasks.withType&lt;KotlinCompile>{ kotlinOptions.jvmTarget = \"1.8\" }   tasks.withType&lt;Test>{ useJUnitPlatform() } <\/code><\/pre>\n<p>\u0415\u0441\u043b\u0438 \u0432\u044b \u0441\u0434\u0435\u043b\u0430\u043b\u0438 \u0432\u0441\u0451 \u043e\u043f\u0438\u0441\u0430\u043d\u043d\u043e\u0435 \u0432\u044b\u0448\u0435, \u0442\u043e \u043d\u0430 \u044d\u0442\u043e\u043c \u044d\u0442\u0430\u043f\u0435 \u0443 \u0432\u0430\u0441 \u0434\u043e\u043b\u0436\u043d\u044b \u043f\u043e\u044f\u0432\u0438\u0442\u044c\u0441\u044f \u0432\u043e\u0442 \u0442\u0430\u043a\u0438\u0435 \u0437\u043d\u0430\u0447\u043a\u0438. \u041e\u043d\u0438 \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u044e\u0442, \u0447\u0442\u043e \u043d\u0430\u0434\u043e \u043f\u043e\u0434\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u0444\u0430\u0439\u043b\u044b \u0438 \u0441\u043e\u0431\u0440\u0430\u0442\u044c \u043f\u0440\u043e\u0435\u043a\u0442 \u0437\u0430\u043d\u043e\u0432\u043e.<\/p>\n<figure class=\"\"><\/figure>\n<p>\u041d\u0430\u0436\u0438\u043c\u0430\u0435\u043c \u0441\u043f\u0435\u0440\u0432\u0430 \u043d\u0430 \u043e\u0434\u0438\u043d \u0437\u043d\u0430\u0447\u043e\u043a \u0444\u0430\u0439\u043b\u0430, \u0437\u0430\u0442\u0435\u043c \u043d\u0430 \u0434\u0440\u0443\u0433\u043e\u0439 (\u043d\u0430 \u0441\u043b\u043e\u043d\u0430). \u041c\u044b \u0438\u0437\u043c\u0435\u043d\u0438\u043b\u0438 \u0444\u0430\u0439\u043b \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043a, \u0438 \u0442\u0435\u043f\u0435\u0440\u044c \u044d\u0442\u0438 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0434\u043e\u043b\u0436\u043d\u044b \u0432\u0441\u0442\u0443\u043f\u0438\u0442\u044c \u0432 \u0441\u0438\u043b\u0443 \u0441 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u043e\u0439 \u043d\u0443\u0436\u043d\u044b\u0445 \u043d\u0430\u043c \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a.<\/p>\n<p>\u041f\u043e\u0441\u043b\u0435 \u0442\u043e\u0433\u043e \u043a\u0430\u043a \u0432\u0441\u0435 \u043f\u043e\u0434\u0433\u0440\u0443\u0437\u0438\u0442\u0441\u044f, \u043a\u0440\u0430\u0441\u043d\u044b\u0439 \u0442\u0435\u043a\u0441\u0442 (\u043d\u0430 \u0441\u043a\u0440\u0438\u043d\u0435) \u043f\u0440\u043e\u043f\u0430\u0434\u0435\u0442.<\/p>\n<figure class=\"full-width\"><\/figure>\n<p>\u0414\u0430\u043b\u0435\u0435 \u0438\u0434\u0435\u043c \u0432 settings.gradle.kts.<\/p>\n<figure class=\"full-width\"><\/figure>\n<p>\u0417\u0434\u0435\u0441\u044c \u043c\u044b \u043f\u0438\u0448\u0435\u043c, \u0447\u0442\u043e \u0441\u043e\u0437\u0434\u0430\u043b\u0438 \u043f\u0430\u043f\u043a\u0443 \u0441 \u043f\u0440\u043e\u0442\u043e-\u0444\u0430\u0439\u043b\u0430\u043c\u0438 \u0438 \u0435\u0451 \u0442\u043e\u0436\u0435 \u0431\u0443\u0434\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043a\u0430\u043a \u0447\u0430\u0441\u0442\u044c \u043f\u0440\u043e\u0435\u043a\u0442\u0430. \u0417\u0430\u0442\u0435\u043c \u043e\u043f\u044f\u0442\u044c \u043f\u0435\u0440\u0435\u0441\u043e\u0431\u0438\u0440\u0430\u0435\u043c \u043f\u0440\u043e\u0435\u043a\u0442, \u043d\u0430\u0436\u0430\u0432 \u043d\u0430 \u0443\u0436\u0435 \u0437\u043d\u0430\u043a\u043e\u043c\u044b\u0439 \u0437\u043d\u0430\u0447\u043e\u043a \u0441\u043b\u043e\u043d\u0430.<\/p>\n<figure class=\"full-width\"><\/figure>\n<ol start=\"2\">\n<li>\n<p><strong>\u0421\u043e\u0437\u0434\u0430\u0451\u043c \u043a\u043b\u0438\u0435\u043d\u0442\u0430<\/strong><\/p>\n<p>\u0421\u043e\u0437\u0434\u0430\u0451\u043c new package service, \u0430 \u0432 \u043d\u0451\u043c \u2014 new Kotlin class \u043f\u043e\u0434 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435\u043c DogsClientService. \u0412 \u0443\u0447\u0435\u0431\u043d\u044b\u0445 \u0446\u0435\u043b\u044f\u0445 \u0431\u0443\u0434\u0435\u043c \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0442\u044c \u0441\u0438\u043c\u0443\u043b\u044f\u0442\u043e\u0440 \u0441\u043e\u0431\u0430\u043a\u0438. \u0414\u0430.<\/p>\n<\/li>\n<\/ol>\n<figure class=\"full-width\"><\/figure>\n<figure class=\"float full-width\"><\/figure>\n<p>\u0422\u0430\u043a\u0436\u0435 \u043d\u0435 \u0437\u0430\u0431\u0443\u0434\u0435\u043c \u043d\u0430 \u044d\u0442\u043e\u043c \u0448\u0430\u0433\u0435 \u0441\u0431\u0438\u043b\u0434\u0438\u0442\u044c \u043f\u0440\u043e\u0442\u043e-\u0444\u0430\u0439\u043b\u044b, \u0447\u0442\u043e\u0431\u044b \u043d\u0430\u043c \u0443\u0434\u043e\u0431\u043d\u0435\u0435 \u0431\u044b\u043b\u043e \u043f\u0438\u0441\u0430\u0442\u044c \u0430\u0432\u0442\u043e\u0442\u0435\u0441\u0442, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u0438\u0445. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043d\u0443\u0436\u043d\u043e \u0441\u043f\u0435\u0440\u0432\u0430 \u043e\u0442\u043a\u0440\u044b\u0442\u044c Gradle \u0441\u0431\u043e\u043a\u0443 \u0438 \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0434\u0432\u043e\u0439\u043d\u043e\u0439 \u043a\u043b\u0438\u043a \u043d\u0430 clean. \u0410 \u0437\u0430\u0442\u0435\u043c \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0434\u0432\u043e\u0439\u043d\u043e\u0439 \u043a\u043b\u0438\u043a \u043d\u0430 build.<\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u043c\u0441\u044f \u043a DogsClientService, \u0434\u0435\u043b\u0430\u0435\u043c \u0438\u043c\u043f\u043e\u0440\u0442\u044b \u0438 \u043d\u043e\u0442\u0430\u0446\u0438\u0438<\/p>\n<figure class=\"full-width\"><\/figure>\n<p>\u0418 \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u043c \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0442\u044c \u043d\u0430\u0448 \u0441\u0442\u0430\u0431. \u041f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u043c\u044b \u0441\u0431\u0438\u043b\u0434\u0438\u043b\u0438 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e Gradle \u043d\u0430\u0448\u0438 \u043f\u0440\u043e\u0442\u043e- \u0444\u0430\u0439\u043b\u044b (\u044d\u0442\u043e \u043c\u043e\u0436\u043d\u043e \u0443\u0432\u0438\u0434\u0435\u0442\u044c, \u0435\u0441\u043b\u0438 \u043e\u0442\u043a\u0440\u044b\u0442\u044c \u0441\u0431\u043e\u043a\u0443 extracted-protos ), \u043c\u044b \u0443\u0432\u0438\u0434\u0438\u043c \u043f\u043e\u044f\u0432\u043b\u0435\u043d\u0438\u0435 \u043d\u0430\u0448\u0435\u0433\u043e DoggRPC.<\/p>\n<figure class=\"full-width\"><\/figure>\n<p>\u0418 \u0437\u043d\u0430\u0447\u0438\u0442 \u0442\u0435\u043f\u0435\u0440\u044c, \u0431\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u044f \u043a\u043e\u0434\u043e\u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438, \u0443 \u043d\u0430\u0441 \u0431\u0443\u0434\u0443\u0442 \u043f\u043e\u044f\u0432\u043b\u044f\u0442\u044c\u0441\u044f \u043f\u043e\u0434\u0441\u043a\u0430\u0437\u043a\u0438!<\/p>\n<figure class=\"full-width\"><\/figure>\n<p>\u0412\u044b\u0431\u0438\u0440\u0430\u0435\u043c BlockingStub, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u0443 \u043d\u0430\u0441 \u043e\u0431\u044b\u0447\u043d\u044b\u0439 \u0437\u0430\u043f\u0440\u043e\u0441, \u043d\u0435 \u043f\u043e\u0442\u043e\u043a\u043e\u0432\u044b\u0439 \u0438 \u043d\u0435 \u0430\u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u044b\u0439. \u041d\u0438\u0436\u0435 \u043c\u044b \u043e\u043f\u0438\u0441\u0430\u043b\u0438, \u0447\u0442\u043e \u044d\u0442\u043e\u0442 \u043a\u043b\u0438\u0435\u043d\u0442 \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u043c \u0434\u043b\u044f \u0433\u0430\u0432\u043a\u0430\u043d\u044c\u044f:<\/p>\n<figure class=\"full-width\"><\/figure>\n<p>\u0410 \u0437\u0430\u043f\u0440\u043e\u0441 \u0438 \u043e\u0442\u0432\u0435\u0442 \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u044b \u043d\u0430\u043c \u0438\u0437 \u043f\u0440\u043e\u0442\u043e-\u0444\u0430\u0439\u043b\u0430. <\/p>\n<figure class=\"full-width\"><\/figure>\n<p>\u0424\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438, \u043c\u044b \u043d\u0430\u043f\u0438\u0441\u0430\u043b\u0438, \u0447\u0442\u043e \u043d\u0430\u0448 \u043a\u043b\u0438\u0435\u043d\u0442 \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 \u044d\u0442\u0438\u043c \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u043c.<\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0441\u0434\u0435\u043b\u0430\u0435\u043c \u043a\u043b\u0430\u0441\u0441 DogSteps, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u043d\u0430\u043f\u0438\u0448\u0435\u043c \u043c\u0435\u0442\u043e\u0434, \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u044e\u0449\u0438\u0439 \u043d\u0430\u0448 \u0437\u0430\u043f\u0440\u043e\u0441 \u0434\u043b\u044f \u0433\u0430\u0432\u043a\u0430\u043d\u044c\u044f makeBark.<\/p>\n<p>\u0421\u0435\u0439\u0447\u0430\u0441 \u0443 \u043d\u0430\u0441 \u043e\u0447\u0435\u043d\u044c \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u0432\u044b\u0437\u043e\u0432 \u043c\u0435\u0442\u043e\u0434\u0430 API \u0441 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u043c \u0431\u0435\u0437 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0441\u0442\u0440\u043e\u0447\u043a\u0438 11 \u0438 13 \u043a\u0430\u0436\u0443\u0442\u0441\u044f \u0438\u0437\u0431\u044b\u0442\u043e\u0447\u043d\u044b\u043c\u0438, \u043d\u043e \u0432 \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0438\u0445 \u043f\u0440\u0438\u043c\u0435\u0440\u0430\u0445 \u043c\u044b \u0443\u0432\u0438\u0434\u0438\u043c, \u0447\u0442\u043e \u0437\u0434\u0435\u0441\u044c \u043c\u043e\u0436\u0435\u043c \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u0432 \u043d\u0430\u0448 request .<\/p>\n<p>\u0410 \u043f\u043e\u043a\u0430 \u0434\u0435\u043b\u0430\u0435\u043c \u0435\u0433\u043e \u0442\u0430\u043a\u0438\u043c \u0438 \u043d\u0430 14 \u0441\u0442\u0440\u043e\u043a\u0435 \u043f\u0438\u0448\u0435\u043c \u0432\u044b\u0437\u043e\u0432 \u043c\u0435\u0442\u043e\u0434\u0430 API barkRequest, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043d\u0430\u043f\u0438\u0441\u0430\u043b\u0438 \u0432 \u043a\u043b\u0438\u0435\u043d\u0442\u0435 DogsClientService (\u043e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435, \u0447\u0442\u043e \u0432 7 \u0441\u0442\u0440\u043e\u043a\u0435 \u043c\u044b \u0441\u043e\u0437\u0434\u0430\u043b\u0438 \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440 \u044d\u0442\u043e\u0433\u043e \u043a\u043b\u0438\u0435\u043d\u0442\u0430) \u0441 \u043d\u0430\u0448\u0438\u043c \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u043c request2. \u0418 \u043a\u043b\u0430\u0434\u0435\u043c \u0435\u0433\u043e \u0432 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e getResponse \u2014  \u0434\u0430\u043d\u043d\u044b\u0435, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043d\u0430\u043c \u043f\u0440\u0438\u0434\u0443\u0442 \u043f\u043e\u0441\u043b\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0437\u0430\u043f\u0440\u043e\u0441\u0430.<\/p>\n<figure class=\"full-width\"><\/figure>\n<p>\u0418\u0434\u0435\u043c \u0432 Main.kt \u0438 \u0434\u0435\u043b\u0430\u0435\u043c \u0438\u043c\u043f\u043e\u0440\u0442 \u043a\u043e\u043c\u0430\u043d\u0434\u043e\u0439<code>import t.DogSteps. <\/code><\/p>\n<p>\u0417\u0430\u0442\u0435\u043c \u0434\u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u043c \u0432 DogsTestApp \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e \u0432\u043d\u0443\u0442\u0440\u0438 \u0441\u043a\u043e\u0431\u043e\u043a (private val mydogSteps:DogSteps) \u0438 \u043f\u0435\u0440\u0435\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u043c \u043c\u0435\u0442\u043e\u0434 run, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u043c\u044b \u0447\u0435\u0440\u0435\u0437 \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u0443\u044e \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e mydogStep \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u0432\u044b\u0437\u043e\u0432 \u043c\u0435\u0442\u043e\u0434\u0430 MakeBark.<\/p>\n<p>\u041e\u0441\u0442\u0430\u0451\u0442\u0441\u044f \u0437\u0430\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u043d\u0430\u0448 \u0432\u044b\u0437\u043e\u0432 \u043c\u0435\u0442\u043e\u0434\u0430 \u0432 try catch, \u0447\u0442\u043e\u0431\u044b \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u0443\u0432\u0438\u0434\u0435\u0442\u044c \u043e\u0448\u0438\u0431\u043a\u0438, \u0435\u0441\u043b\u0438 \u0437\u0430\u043f\u0440\u043e\u0441 \u043d\u0435 \u0441\u043c\u043e\u0436\u0435\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c\u0441\u044f.<\/p>\n<figure class=\"full-width\"><\/figure>\n<p>\u0418 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0439 \u0448\u0430\u0433 \u2014\u00a0 \u0432 resources \u0441\u043e\u0437\u0434\u0430\u0435\u043c \u0444\u0430\u0439\u043b <a href=\"http:\/\/application.properties\">application.properties<\/a>, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u043f\u0438\u0448\u0435\u043c \u0430\u0434\u0440\u0435\u0441, \u0433\u0434\u0435 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f API, \u043a \u043a\u043e\u0442\u043e\u0440\u043e\u043c\u0443 \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u043e\u0431\u0440\u0430\u0449\u0430\u0442\u044c\u0441\u044f.<\/p>\n<figure class=\"full-width\"><\/figure>\n<p>\u0418 \u0442\u0435\u043f\u0435\u0440\u044c \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u043d\u0430\u0448 API-\u0442\u0435\u0441\u0442, \u043d\u0430\u0436\u0430\u0432 \u043d\u0430 \u0437\u0435\u043b\u0435\u043d\u0443\u044e \u0441\u0442\u0440\u0435\u043b\u043a\u0443!<\/p>\n<p>\u041f\u0440\u0430\u0432\u0434\u0430 \u0441\u0435\u0439\u0447\u0430\u0441 \u043e\u043d \u0443 \u043d\u0430\u0441 \u043d\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u0441\u044f, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u0430\u0434\u0440\u0435\u0441 static:\/\/your_name:1234 \u043d\u0435 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0432 \u0441\u0435\u0431\u0435 \u0440\u0443\u0447\u043a\u0443 \u043d\u0430\u0448\u0435\u0433\u043e API. \u0427\u0442\u043e\u0431\u044b \u0443\u0432\u0438\u0434\u0435\u0442\u044c \u0437\u0430\u043f\u0443\u0441\u043a \u043f\u0440\u0438\u0434\u0435\u0442\u0441\u044f \u043f\u043e\u0434\u043d\u0438\u043c\u0430\u0442\u044c \u0443 \u0441\u0435\u0431\u044f \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e API \u0441 \u043d\u0430\u0448\u0438\u043c \u043f\u0440\u043e\u0442\u043e-\u0444\u0430\u0439\u043b\u043e\u043c \u0438\u043b\u0438, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u044d\u0442\u043e\u0442 \u043f\u0440\u0438\u043c\u0435\u0440 \u043a\u0430\u043a \u043e\u0441\u043d\u043e\u0432\u0443, \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0437\u0430\u043f\u0440\u043e\u0441 \u043a \u0441\u0432\u043e\u0435\u043c\u0443 API, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0432\u044b \u0442\u0435\u0441\u0442\u0438\u0440\u0443\u0435\u0442\u0435.<\/p>\n<ol start=\"3\">\n<li>\n<p><strong>\u041f\u043e\u043b\u0435\u0437\u043d\u044b\u0435 \u0441\u043e\u0432\u0435\u0442\u044b.<\/strong> <\/p>\n<\/li>\n<\/ol>\n<p><strong>3.1. \u0414\u043b\u044f \u0441\u043b\u043e\u0436\u043d\u044b\u0445 \u043c\u0435\u0441\u0441\u0430\u0434\u0436\u0435\u0439 \u0432 \u043f\u0440\u043e\u0442\u043e-\u0444\u0430\u0439\u043b\u0435.<\/strong> <\/p>\n<p>\u0412\u043e\u0437\u044c\u043c\u0451\u043c \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0439<code> message<\/code><\/p>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\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-367615","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/367615","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=367615"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/367615\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=367615"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=367615"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=367615"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}