{"id":364649,"date":"2024-05-21T02:21:27","date_gmt":"2024-05-21T02:21:27","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=364649"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=364649","title":{"rendered":"<span>\u0417\u0430\u0434\u0430\u0447\u0430 \u043d\u0430 \u0441\u043e\u0431\u0435\u0441\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u0438, \u0435\u0451 \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u0438 \u0435\u0433\u043e \u0440\u0430\u0437\u0431\u043e\u0440<\/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-1\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u041f\u0440\u0438\u0432\u0435\u0442, \u043e\u0431\u044b\u0447\u043d\u043e \u043f\u0430\u0440\u0443 \u0440\u0430\u0437 \u0432 \u0433\u043e\u0434 \u044f \u0445\u043e\u0436\u0443 \u043d\u0430 \u0441\u043e\u0431\u0435\u0441\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u044f \u0431\u0435\u0437 \u043d\u0430\u043c\u0435\u0440\u0435\u043d\u0438\u044f \u043c\u0435\u043d\u044f\u0442\u044c \u0440\u0430\u0431\u043e\u0442\u0443, \u0430 \u0434\u043b\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u043d\u043e\u0432\u043e\u0433\u043e \u043e\u043f\u044b\u0442\u0430 \u0438 \u0432 \u043f\u043e\u0438\u0441\u043a\u0430\u0445 \u0430\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u043e\u0442\u0432\u0435\u0442\u0430 \u043d\u0430 \u0432\u043e\u043f\u0440\u043e\u0441 &#171;\u0410 \u0447\u0442\u043e \u0441\u0435\u0439\u0447\u0430\u0441 \u0441\u043f\u0440\u0430\u0448\u0438\u0432\u0430\u044e\u0442?&#187;<\/p>\n<p>  <\/p>\n<p>\u0427\u0430\u0441\u0442\u043e \u0442\u0430\u043c \u0437\u0430\u0434\u0430\u044e\u0442 \u043e\u0431\u044b\u0447\u043d\u044b\u0435, \u0434\u0430\u0436\u0435 \u0441\u043a\u0443\u0447\u043d\u044b\u0435 \u0432\u043e\u043f\u0440\u043e\u0441\u044b \u0432\u0440\u043e\u0434\u0435 &#171;\u0440\u0430\u0441\u0441\u043a\u0430\u0436\u0438\u0442\u0435 \u043e \u043a\u043e\u043d\u0442\u0440\u0430\u043a\u0442\u0435 \u043c\u0435\u0436\u0434\u0443 <code>equals()<\/code>\u0438 <code>hashCode()<\/code>&#171;, \u043d\u043e \u0438\u043d\u043e\u0433\u0434\u0430 \u043f\u043e\u043f\u0430\u0434\u0430\u044e\u0442\u0441\u044f \u043e\u0447\u0435\u043d\u044c \u0443\u043c\u043d\u044b\u0435 \u0438 \u043f\u0440\u0438\u044f\u0442\u043d\u044b\u0435 \u0438\u043d\u0442\u0435\u0440\u0432\u044c\u044e\u0435\u0440\u044b, \u043f\u0440\u043e\u0432\u043e\u0434\u044f\u0449\u0438\u0435 \u0441\u043e\u0431\u0435\u0441\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u0435 \u0432\u0434\u0443\u043c\u0447\u0438\u0432\u043e, \u0440\u0430\u0441\u0441\u043f\u0440\u0430\u0448\u0438\u0432\u0430\u044e\u0449\u0438\u0435 \u043e \u0442\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438\u044f\u0445, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0445 \u043d\u0430 \u0446\u0435\u043b\u0435\u0432\u043e\u043c \u043f\u0440\u043e\u0435\u043a\u0442\u0435 (\u0430 \u043d\u0435 \u043e\u0431 \u0430\u0431\u0441\u0442\u0440\u0430\u043a\u0442\u043d\u043e\u043c <code>volatile<\/code>), \u0441\u0442\u0430\u0432\u044f\u0449\u0438\u0435 \u043d\u0435\u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0435 \u0432\u043e\u043f\u0440\u043e\u0441\u044b \u0438 \u0437\u0430\u0434\u0430\u0447\u0438. \u0421\u0435\u0433\u043e\u0434\u043d\u044f\u0448\u043d\u044f\u044f \u0441\u0442\u0430\u0442\u044c\u044f \u0431\u0443\u0434\u0435\u0442 \u043e\u0431 \u043e\u0434\u043d\u043e\u043c \u0438\u0437 \u0442\u0430\u043a\u0438\u0445 \u0437\u0430\u043c\u0435\u0447\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u0441\u043e\u0431\u0435\u0441\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u0439 (\u0432\u0435\u0440\u043d\u0435\u0435 \u043e \u0437\u0430\u0434\u0430\u0447\u0435) \u0438 \u043e \u0432\u043e\u043f\u0440\u043e\u0441\u0430\u0445, \u043f\u043e\u0434\u043d\u044f\u0442\u044b\u0445 \u0432 \u0445\u043e\u0434\u0435 \u0435\u0451 \u043e\u0431\u0441\u0443\u0436\u0434\u0435\u043d\u0438\u044f.<\/p>\n<p><a name=\"habracut\"><\/a>  <\/p>\n<p>\u0424\u043e\u0440\u043c\u0430\u0442, \u043e \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u043c\u044b \u0434\u043e\u0433\u043e\u0432\u043e\u0440\u0438\u043b\u0438\u0441\u044c \u0432\u043e\u043e\u0431\u0449\u0435 \u043d\u0435 \u043f\u0440\u0435\u0434\u0443\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u043b \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0445 \u0432\u043e\u043f\u0440\u043e\u0441\u043e\u0432 \u0438 \u043e\u0442\u0432\u0435\u0442\u043e\u0432. \u0411\u044b\u043b\u043e \u0443\u0441\u043b\u043e\u0432\u043b\u0435\u043d\u043e, \u0447\u0442\u043e \u0432 \u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u043d\u043e\u0435 \u0432\u0440\u0435\u043c\u044f \u043c\u043d\u0435 \u043f\u0440\u0438\u0448\u043b\u044e\u0442 \u0437\u0430\u0434\u0430\u0447\u0443, \u043e\u0431\u0440\u0430\u0442\u043d\u043e \u0447\u0435\u0440\u0435\u0437 \u0447\u0430\u0441 \u044f \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044e \u0440\u0435\u0448\u0435\u043d\u0438\u0435. \u041d\u0430 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u0434\u0435\u043d\u044c \u0431\u0443\u0434\u0435\u0442 \u0441\u043e\u0437\u0432\u043e\u043d \u043d\u0430 \u043f\u043e\u043b\u0447\u0430\u0441\u0430-\u0447\u0430\u0441\u0430, \u043c\u044b \u043f\u043e\u043e\u0431\u0449\u0430\u0435\u043c\u0441\u044f \u0438 \u043e\u0431\u0441\u0443\u0434\u0438\u043c \u0440\u0435\u0448\u0435\u043d\u0438\u0435. \u0422\u0430\u043a \u0438 \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u043e\u0441\u044c.<\/p>\n<p>  <\/p>\n<p>\u0412\u043e\u0442 \u0443\u0441\u043b\u043e\u0432\u0438\u0435 \u0437\u0430\u0434\u0430\u0447\u0438:<\/p>\n<p>  <\/p>\n<blockquote><p>\u0421\u043e\u0437\u0434\u0430\u0442\u044c \u043c\u0438\u043a\u0440\u043e\u0441\u0435\u0440\u0432\u0438\u0441, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043e\u0442\u0434\u0430\u0435\u0442 \u0448\u0443\u0442\u043a\u0438 \u043f\u043e API. \u0422\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438\u0438: Java, Spring Boot.<\/p>\n<p>  \u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 API:<\/p>\n<p>  \u041c\u0435\u0442\u043e\u0434 GET \/jokes, \u0435\u0433\u043e \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b: <code>count<\/code>: \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0448\u0443\u0442\u043e\u043a (\u043e\u0442 1 \u0434\u043e 100), \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e 5. \u0412 \u0441\u043b\u0443\u0447\u0430\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u0431\u043e\u043b\u0435\u0435 100 \u0448\u0443\u0442\u043e\u043a \u043d\u0443\u0436\u043d\u043e \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0442\u044c \u043e\u0448\u0438\u0431\u043a\u0443 &#171;\u0417\u0430 \u043e\u0434\u0438\u043d \u0440\u0430\u0437 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043d\u0435 \u0431\u043e\u043b\u0435\u0435 100 \u0448\u0443\u0442\u043e\u043a.&#187;.<\/p>\n<p>  \u0428\u0443\u0442\u043a\u0438 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043f\u043e API: <a href=\"https:\/\/official-joke-api.appspot.com\/random_joke\" rel=\"nofollow noopener noreferrer\">https:\/\/official-joke-api.appspot.com\/random_joke<\/a> (\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u044d\u0442\u043e API!) \u0412 \u0441\u043b\u0443\u0447\u0430\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u0431\u043e\u043b\u0435\u0435 \u043e\u0434\u043d\u043e\u0439 \u0448\u0443\u0442\u043a\u0438, \u043e\u043d\u0438 \u0434\u043e\u043b\u0436\u043d\u044b \u0437\u0430\u043f\u0440\u0430\u0448\u0438\u0432\u0430\u0442\u044c\u0441\u044f \u043f\u0430\u0447\u043a\u0430\u043c\u0438 \u043f\u043e 10 \u0448\u0442\u0443\u043a \u043f\u0430\u0440\u0430\u043b\u043b\u0435\u043b\u044c\u043d\u043e (\u0442.\u0435. 10 \u0448\u0442\u0443\u043a \u043f\u0430\u0440\u0430\u043b\u043b\u0435\u043b\u044c\u043d\u043e, \u043f\u043e\u0442\u043e\u043c \u0435\u0449\u0435 10 \u0448\u0442\u0443\u043a \u043f\u0430\u0440\u0430\u043b\u043b\u0435\u043b\u044c\u043d\u043e \u0438 \u0442. \u0434.). \u041a\u043e\u0434 \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u043f\u043e\u043a\u0440\u044b\u0442 \u0442\u0435\u0441\u0442\u0430\u043c\u0438.<\/p><\/blockquote>\n<p>\u041c\u043e\u0451 \u0440\u0435\u0448\u0435\u043d\u0438\u0435 as is \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e \u043f\u043e \u0441\u0441\u044b\u043b\u043a\u0435 <a href=\"https:\/\/github.com\/stsypanov\/demo\" rel=\"nofollow noopener noreferrer\">https:\/\/github.com\/stsypanov\/demo<\/a>.<\/p>\n<p>  <\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0432\u043e\u0441\u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0434\u0451\u043c \u0431\u043b\u0438\u0437\u043a\u043e \u043a \u0442\u0435\u043a\u0441\u0442\u0443 \u0435\u0433\u043e \u043e\u0431\u0441\u0443\u0436\u0434\u0435\u043d\u0438\u0435.<\/p>\n<p>  <\/p>\n<p>\u0418\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e\u0435 \u043d\u0430\u0447\u0430\u043b\u043e\u0441\u044c \u043f\u0440\u044f\u043c\u043e \u0441 <code>pom.xml<\/code>:<\/p>\n<p>  <\/p>\n<pre><code class=\"xml\">&lt;project xmlns=\"http:\/\/maven.apache.org\/POM\/4.0.0\" xmlns:xsi=\"http:\/\/www.w3.org\/2001\/XMLSchema-instance\"          xsi:schemaLocation=\"http:\/\/maven.apache.org\/POM\/4.0.0 https:\/\/maven.apache.org\/xsd\/maven-4.0.0.xsd\">     &lt;modelVersion>4.0.0&lt;\/modelVersion>     &lt;parent>         &lt;groupId>org.springframework.boot&lt;\/groupId>         &lt;artifactId>spring-boot-starter-parent&lt;\/artifactId>         &lt;version>3.1.3&lt;\/version>         &lt;relativePath\/>     &lt;\/parent>     &lt;groupId>com.example&lt;\/groupId>     &lt;artifactId>demo&lt;\/artifactId>     &lt;version>0.0.1-SNAPSHOT&lt;\/version>     &lt;name>demo&lt;\/name>     &lt;description>demo&lt;\/description> &lt;!--  ...  --> &lt;\/project><\/code><\/pre>\n<p>  <\/p>\n<p>\u0414\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0437\u0430\u0433\u043e\u0442\u043e\u0432\u043a\u0438 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0441\u044f <a href=\"https:\/\/start.spring.io\/\" rel=\"nofollow noopener noreferrer\">spring initializr<\/a>. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u043f\u0435\u0440\u0432\u044b\u0439 \u0432\u043e\u043f\u0440\u043e\u0441 \u0437\u0432\u0443\u0447\u0438\u0442 \u0442\u0430\u043a: \u0447\u0442\u043e \u0435\u0449\u0451 \u0434\u0430\u0451\u0442 \u0438\u0437 \u043a\u043e\u0440\u043e\u0431\u043a\u0438 spring initializr, \u043a\u0440\u043e\u043c\u0435 \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e\u0439 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b \u043f\u0430\u043f\u043e\u043a \u0438 \u043f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u0432\u044b\u0431\u0440\u0430\u043d\u043d\u044b\u0445 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u043c \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0435\u0439?<\/p>\n<p>  <\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">\u041e\u0442\u0432\u0435\u0442<\/b>                         <\/p>\n<div class=\"spoiler_text\">\n<p>Spring initializr \u043d\u0435 \u043f\u0440\u043e\u0441\u0442\u043e \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u0442 \u0432 <code>pom.xml<\/code>\/<code>build.gradle<\/code> \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 (\u0438 \u043f\u043b\u0430\u0433\u0438\u043d\u044b), \u043d\u043e \u0435\u0449\u0451 \u0438 \u0433\u0430\u0440\u043c\u043e\u043d\u0438\u0437\u0438\u0440\u0443\u0435\u0442 \u0438\u0445. \u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u0432\u044b \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0435 \u043f\u0440\u043e\u0435\u043a\u0442 \u0431\u0435\u0437 \u043a\u043e\u043d\u0444\u043b\u0438\u043a\u0442\u043e\u0432, \u0438 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043d\u0435 \u0441\u0432\u0430\u043b\u0438\u0442\u0441\u044f \u0441 <code>NoClassDefFoundError<\/code> \u0438\u043b\u0438 <code>NoSuchBeanDefinitionException<\/code>. \u042d\u0442\u043e \u0432\u0434\u0432\u043e\u0439\u043d\u0435 \u0432\u0430\u0436\u043d\u043e, \u0435\u0441\u043b\u0438 \u0432\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0435 <a href=\"https:\/\/stackoverflow.com\/questions\/42659920\/is-there-a-compatibility-matrix-of-spring-boot-and-spring-cloud\" rel=\"nofollow noopener noreferrer\">Spring Cloud<\/a>.<\/p>\n<\/div><\/div>\n<p>  <\/p>\n<p>\u041d\u043e \u0432\u0435\u0440\u043d\u0451\u043c\u0441\u044f \u043a \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 \u0442\u0435\u043c\u0435.<\/p>\n<p>  <\/p>\n<p>\u0421\u043f\u043e\u0440\u043d\u044b\u043c \u043c\u043e\u043c\u0435\u043d\u0442\u043e\u043c \u0432 \u044d\u0442\u043e\u043c <code>pom.xml<\/code> \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043d\u0430\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u0435 \u043e\u0442 <code>spring-boot-starter-parent<\/code>. \u0412 \u0434\u0430\u043d\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u044d\u0442\u043e \u043d\u0435 \u0441\u0442\u043e\u043b\u044c \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u0442. \u043a. \u043f\u0440\u043e\u0435\u043a\u0442 \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0438\u0437 \u043e\u0434\u043d\u043e\u0433\u043e \u043c\u043e\u0434\u0443\u043b\u044f, \u043d\u043e \u0432 \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0435\u043c \u043c\u043e\u0436\u0435\u0442 \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b. \u0414\u043e\u043f\u0443\u0441\u0442\u0438\u043c, \u043c\u044b \u0440\u0435\u0448\u0438\u043b\u0438 \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0439 \u043c\u043e\u0434\u0443\u043b\u044c \u0434\u043e\u0447\u0435\u0440\u043d\u0438\u043c, \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u043f\u043e\u0434\u0432\u044f\u0437\u0430\u0442\u044c \u0435\u0433\u043e \u043a \u0440\u043e\u0434\u0438\u0442\u0435\u043b\u044e, \u0430 \u043c\u0435\u0441\u0442\u043e \u0443\u0436\u0435 \u0437\u0430\u043d\u044f\u0442\u043e. \u041f\u0440\u0438\u0434\u0451\u0442\u0441\u044f \u043f\u0435\u0440\u0435\u043f\u0438\u0441\u044b\u0432\u0430\u0442\u044c <code>&lt;parent\/><\/code> \u0438 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0442\u044c <code>spring-boot-dependencies<\/code> \u0432 \u0440\u0430\u0437\u0434\u0435\u043b <code>&lt;dependencyManagement\/><\/code>:<\/p>\n<p>  <\/p>\n<pre><code class=\"xml\">&lt;dependencyManagement>     &lt;dependencies>         &lt;dependency>             &lt;groupId>org.springframework.cloud&lt;\/groupId>             &lt;artifactId>spring-cloud-dependencies&lt;\/artifactId>             &lt;version>${spring-cloud.version}&lt;\/version>             &lt;type>pom&lt;\/type>             &lt;scope>import&lt;\/scope>         &lt;\/dependency>         &lt;dependency>             &lt;groupId>org.springframework.boot&lt;\/groupId>             &lt;artifactId>spring-boot-dependencies&lt;\/artifactId>             &lt;version>${spring-boot.version}&lt;\/version>             &lt;type>pom&lt;\/type>             &lt;scope>import&lt;\/scope>         &lt;\/dependency>     &lt;\/dependencies> &lt;\/dependencyManagement><\/code><\/pre>\n<p>  <\/p>\n<p>\u0421 \u0434\u0440\u0443\u0433\u043e\u0439 \u0441\u0442\u043e\u0440\u043e\u043d\u044b, \u043f\u0440\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438 <code>spring-boot-dependencies<\/code> \u043c\u044b \u043b\u0438\u0448\u0430\u0435\u043c\u0441\u044f \u0447\u0430\u0441\u0442\u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043a, \u043d\u0430\u0441\u043b\u0435\u0434\u0443\u0435\u043c\u044b\u0445 \u043e\u0442 <code>spring-boot-parent<\/code>, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0442\u0435\u043f\u0435\u0440\u044c \u043d\u0443\u0436\u043d\u043e \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u0443 \u0432\u0435\u0440\u0441\u0438\u044e Java \u0438 \u043f\u0440\u043e\u043f\u0438\u0441\u0430\u0442\u044c <code>spring-boot.version<\/code> \u0432 \u0440\u0430\u0437\u0434\u0435\u043b\u0435 <code>&lt;properties\/><\/code> (\u043f\u0440\u0438 \u043d\u0430\u043b\u0438\u0447\u0438\u0438 \u0438\u0445 \u0432 \u0440\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u0441\u043a\u043e\u043c <code>pom.xml<\/code> \u044d\u0442\u043e\u0442 \u0448\u0430\u0433 \u043b\u0438\u0448\u043d\u0438\u0439). \u0412 \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0435\u043c\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043f\u043e\u0441\u043b\u0435 \u043e\u0442\u043a\u0430\u0437\u0430 \u043e\u0442 <code>&lt;parent\/><\/code> <code>pom.xml<\/code> \u0441\u0442\u0430\u043b \u043b\u0438\u0448\u044c \u043d\u0430 12 \u0441\u0442\u0440\u043e\u043a \u0434\u043b\u0438\u043d\u043d\u0435\u0435.<\/p>\n<p>  <\/p>\n<p>\u041d\u0430 \u043c\u043e\u0439 \u0432\u0437\u0433\u043b\u044f\u0434 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 <code>&lt;dependencyManagement\/><\/code>\u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0431\u043e\u043b\u0435\u0435 \u0433\u0438\u0431\u043a\u0438\u043c, \u0447\u0435\u043c \u0443\u043a\u0430\u0437\u0430\u043d\u0438\u0435 <code>spring-boot-dependencies<\/code> \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0440\u043e\u0434\u0438\u0442\u0435\u043b\u044f \u0432\u0432\u0438\u0434\u0443 \u043d\u0435\u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u043d\u043e\u0433\u043e \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0430 \u043f\u0440\u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u043c\u044b\u0445 BoM-\u043e\u0432 (<code>&lt;parent\/><\/code> \u0432\u0441\u0435\u0433\u0434\u0430 \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0434\u0438\u043d). \u0412 \u0446\u0435\u043b\u043e\u043c, <a href=\"https:\/\/stackoverflow.com\/questions\/77770762\/why-does-spring-initializr-make-a-project-inheriting-from-spring-boot-starter-pa\/77781621#77781621\" rel=\"nofollow noopener noreferrer\">\u0432\u043e\u043f\u0440\u043e\u0441 \u0434\u0438\u0441\u043a\u0443\u0441\u0441\u0438\u043e\u043d\u043d\u044b\u0439<\/a> \u0438 \u0435\u0433\u043e \u043e\u0431\u0441\u0443\u0436\u0434\u0435\u043d\u0438\u0435 \u043d\u0430 \u0441\u043e\u0431\u0435\u0441\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u0438 \u043f\u043e\u043c\u043e\u0433\u0430\u0435\u0442 \u043f\u043e\u043d\u044f\u0442\u044c, \u043d\u0430\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0433\u043b\u0443\u0431\u043e\u043a\u043e \u0441\u043e\u0438\u0441\u043a\u0430\u0442\u0435\u043b\u044c \u0440\u0430\u0437\u0431\u0438\u0440\u0430\u0435\u0442\u0441\u044f \u0432 \u0432\u043e\u043f\u0440\u043e\u0441\u0430\u0445 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u044f\u043c\u0438, \u0430 \u0442\u0430\u043a\u0436\u0435 \u043a\u043e\u043c\u043f\u043e\u043d\u043e\u0432\u043a\u0438 \u0438 \u0441\u0431\u043e\u0440\u043a\u0438 \u043f\u0440\u043e\u0435\u043a\u0442\u0430.<\/p>\n<p>  <\/p>\n<p>\u0418\u0441\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u043d\u0443\u044e \u0432\u0435\u0440\u0441\u0438\u044e \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0432 \u0432\u0435\u0442\u043a\u0435 <code>reworked<\/code> \u0442\u043e\u0433\u043e \u0436\u0435 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u044f.<\/p>\n<p>  <\/p>\n<p>\u041f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u043c \u043a \u043a\u043e\u0434\u0443.<\/p>\n<p>  <\/p>\n<p>\u0420\u0430\u0437\u0431\u0438\u0440\u0430\u0442\u044c <code>JokeController<\/code> \u0441\u043c\u044b\u0441\u043b\u0430 \u043d\u0435\u0442, \u0442\u0430\u043c \u0432\u0441\u0435\u0433\u043e 16 \u0441\u0442\u0440\u043e\u043a, \u0438\u0437 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 14 \u2013 \u044d\u0442\u043e \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u0438\u0435 \u043a\u043b\u0430\u0441\u0441\u0430, \u043c\u0435\u0442\u043e\u0434\u0430, \u0430\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u0438 \u0438 \u0442. \u043f. \u0421\u043e\u0441\u0440\u0435\u0434\u043e\u0442\u043e\u0447\u0438\u043c\u0441\u044f \u043d\u0430 \u0441\u0435\u0440\u0432\u0438\u0441\u043d\u043e\u043c \u0441\u043b\u043e\u0435, \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u043d\u043e\u043c \u043a\u043b\u0430\u0441\u0441\u043e\u043c <code>JokeProvider<\/code>:<\/p>\n<p>  <\/p>\n<pre><code class=\"java\">@Component @RequiredArgsConstructor public class JokeProvider {   private final JokeForeignClient jokeForeignClient;   private final ExecutorService executor = Executors.newFixedThreadPool(10);    public List&lt;JokeDto> getJokes(int count) {     if (count == 0) {       return List.of();     }     if (count == 1) {       return List.of(jokeForeignClient.takeAJoke());     }     if (count &lt;= 10) {       int batchSize = Math.min(count, 10);       return getJokesInBatch(batchSize);     }     List&lt;JokeDto> jokes = new ArrayList&lt;>();     for (int i = count; i > 0; i -= 10) {       int batchSize = Math.min(i, 10);       jokes.addAll(getJokesInBatch(batchSize));     }     return jokes;   }    private List&lt;JokeDto> getJokesInBatch(int count) {     return IntStream.range(0, count)             .boxed()             .map(operand -> fetchAJoke())             .toList()             .stream()             .map(this::fromFuture)             .toList();   }    @SneakyThrows   private JokeDto fromFuture(Future&lt;JokeDto> future) {     return future.get();   }    @SneakyThrows   private Future&lt;JokeDto> fetchAJoke() {     return executor.submit(jokeForeignClient::takeAJoke);   } }<\/code><\/pre>\n<p>  <\/p>\n<p>\u0417\u0434\u0435\u0441\u044c \u044f \u0434\u043e\u043f\u0443\u0441\u0442\u0438\u043b \u043e\u0434\u043d\u0443 \u0433\u0440\u0443\u0431\u0443\u044e \u043e\u0448\u0438\u0431\u043a\u0443 \u0438 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043c\u0435\u043b\u043a\u0438\u0445. \u041f\u043e\u043f\u0440\u043e\u0431\u0443\u0439\u0442\u0435 \u043d\u0430\u0439\u0442\u0438 \u0438\u0445 \u0441\u0430\u043c\u043e\u0441\u0442\u043e\u044f\u0442\u0435\u043b\u044c\u043d\u043e, \u043e\u0442\u0432\u0435\u0442 \u043d\u0438\u0436\u0435.<\/p>\n<p>  <\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">\u041d\u0430\u0447\u043d\u0451\u043c \u0441 \u043c\u0435\u043b\u043e\u0447\u0435\u0439<\/b>                         <\/p>\n<div class=\"spoiler_text\">\n<p>\u041f\u0443\u0441\u0442\u044f\u043a \u043d\u043e\u043c\u0435\u0440 \u0440\u0430\u0437 \u2013 \u044d\u0442\u043e \u043b\u0438\u0448\u043d\u0438\u0439 <code>Stream.boxed()<\/code>:<\/p>\n<p>  <\/p>\n<pre><code class=\"java\">private List&lt;JokeDto> getJokesInBatch(int count) {   return IntStream.range(0, count)           .boxed()           .map(operand -> fetchAJoke())           .toList()           .stream()           .map(this::fromFuture)           .toList(); }<\/code><\/pre>\n<p>  <\/p>\n<p>\u0415\u0433\u043e \u043c\u043e\u0436\u043d\u043e \u0432\u044b\u0431\u0440\u043e\u0441\u0438\u0442\u044c, \u0437\u0430\u043c\u0435\u043d\u0438\u0432 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u0437\u0430 \u043d\u0438\u043c <code>map()<\/code> \u043d\u0430 <code>mapToObj()<\/code>. <a href=\"https:\/\/youtrack.jetbrains.com\/issue\/IDEA-332266\/IntStream.boxed.map-should-be-detected-and-replaced-with-IntStream.mapToObj\" rel=\"nofollow noopener noreferrer\">\u041f\u043e\u043a\u0430<\/a> &#171;\u0418\u0434\u0435\u044f&#187; \u043d\u0435 \u0443\u043c\u0435\u0435\u0442 \u0432\u044b\u044f\u0432\u043b\u044f\u0442\u044c \u044d\u0442\u043e\u0442 \u0430\u043d\u0442\u0438\u043f\u0430\u0442\u0442\u0435\u0440\u043d, \u0430 \u044f \u0435\u0433\u043e \u043f\u0440\u043e\u043c\u043e\u0440\u0433\u0430\u043b. \u042d\u0442\u043e\u0442 \u043b\u0438\u0448\u043d\u0438\u0439 <code>IntStream.boxed()<\/code> \u043d\u0438 \u043d\u0430 \u0447\u0442\u043e \u043d\u0435 \u0432\u043b\u0438\u044f\u0435\u0442, \u0442.\u043a.<br \/>  1) \u0432\u0441\u0435 \u0447\u0438\u0441\u043b\u0430 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u044b 10, \u0447\u0442\u043e \u0443\u043a\u043b\u0430\u0434\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0432 \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d \u043a\u044d\u0448\u0438\u0440\u0443\u0435\u043c\u044b\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439<br \/>  2) \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440 \u043d\u0430\u0432\u0435\u0440\u043d\u044f\u043a\u0430 \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0438\u0442, \u0447\u0442\u043e \u043e\u0431\u043b\u0430\u0441\u0442\u0438 \u0432\u0438\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0435\u043c\u043e\u0433\u043e <code>Integer<\/code>-\u0430 \u043e\u0447\u0435\u043d\u044c \u0443\u0437\u043a\u0430\u044f, \u0435\u0433\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043d\u0438\u0433\u0434\u0435 \u043d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f, \u0438 \u0441\u043e\u0442\u0440\u0451\u0442 \u0430\u043b\u043b\u043e\u043a\u0430\u0446\u0438\u044e.<\/p>\n<p>  <\/p>\n<p>\u0412\u0442\u043e\u0440\u043e\u0435 \u2013 \u044d\u0442\u043e \u043f\u043e \u043e\u0447\u0435\u0432\u0438\u0434\u043d\u044b\u043c \u043f\u0440\u0438\u0447\u0438\u043d\u0430\u043c \u043b\u0438\u0448\u043d\u0438\u0439 <code>Math.min()<\/code>:<\/p>\n<p>  <\/p>\n<pre><code class=\"java\">if (count &lt;= 10) {   int batchSize = Math.min(count, 10);   return getJokesInBatch(batchSize); }<\/code><\/pre>\n<p>  <\/p>\n<p>\u042d\u0442\u043e\u0442 \u043a\u043e\u0434 \u043f\u043e\u0434\u0441\u0432\u0435\u0447\u0438\u0432\u0430\u0435\u0442\u0441\u044f, \u043d\u043e \u0438\u0437-\u0437\u0430 \u0441\u043f\u0435\u0448\u043a\u0438 \u043e\u0441\u0442\u0430\u0432\u0438\u043b \u043a\u0430\u043a \u0435\u0441\u0442\u044c.<\/p>\n<\/div><\/div>\n<p>  <\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043c\u043e\u0436\u043d\u043e \u043f\u0435\u0440\u0435\u0439\u0442\u0438 \u043a \u043a\u0440\u0443\u043f\u043d\u043e\u0439 \u043e\u0448\u0438\u0431\u043a\u0435:<\/p>\n<p>  <\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">\u0421\u043a\u0440\u044b\u0442\u044b\u0439 \u0442\u0435\u043a\u0441\u0442<\/b>                         <\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"java\">private final ExecutorService executor = Executors.newFixedThreadPool(10);<\/code><\/pre>\n<p>  <\/p>\n<p>\u041e\u043d\u0430 \u043d\u0435 \u0441\u0442\u043e\u043b\u044c \u043e\u0447\u0435\u0432\u0438\u0434\u043d\u0430, \u0438 \u0441\u043f\u043e\u0442\u043a\u043d\u0443\u043b\u0441\u044f \u044f \u043d\u0430 \u0443\u0441\u043b\u043e\u0432\u0438\u0438 \u0437\u0430\u0434\u0430\u0447\u0438:<\/p>\n<p>  <\/p>\n<blockquote><p>\u0412 \u0441\u043b\u0443\u0447\u0430\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u0431\u043e\u043b\u0435\u0435 \u043e\u0434\u043d\u043e\u0439 \u0448\u0443\u0442\u043a\u0438, \u043e\u043d\u0438 \u0434\u043e\u043b\u0436\u043d\u044b \u0437\u0430\u043f\u0440\u0430\u0448\u0438\u0432\u0430\u0442\u044c\u0441\u044f \u043f\u0430\u0447\u043a\u0430\u043c\u0438 \u043f\u043e 10 \u0448\u0442\u0443\u043a \u043f\u0430\u0440\u0430\u043b\u043b\u0435\u043b\u044c\u043d\u043e (\u0442.\u0435. 10 \u0448\u0442\u0443\u043a \u043f\u0430\u0440\u0430\u043b\u043b\u0435\u043b\u044c\u043d\u043e, \u043f\u043e\u0442\u043e\u043c \u0435\u0449\u0435 10 \u0448\u0442\u0443\u043a \u043f\u0430\u0440\u0430\u043b\u043b\u0435\u043b\u044c\u043d\u043e \u0438 \u0442. \u0434.)<\/p><\/blockquote>\n<p>\u041d\u0430 \u043f\u0435\u0440\u0432\u044b\u0439 \u0432\u0437\u0433\u043b\u044f\u0434, \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u043e\u0447\u0435\u043d\u044c \u043b\u043e\u0433\u0438\u0447\u043d\u044b\u043c: \u0440\u0430\u0437 \u043d\u0430\u0448 \u043f\u0430\u0440\u0430\u043b\u043b\u0435\u043b\u0438\u0437\u043c \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d 10 \u043f\u043e\u0442\u043e\u043a\u0430\u043c\u0438, \u0442\u043e \u0432\u043e\u0437\u043d\u0438\u043a\u0430\u0435\u0442 \u0441\u043e\u0431\u043b\u0430\u0437\u043d \u044f\u0432\u043d\u043e \u043f\u0440\u043e\u043f\u0438\u0441\u0430\u0442\u044c \u0438\u0445 \u043f\u0440\u0435\u0434\u0435\u043b\u044c\u043d\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e. \u041e\u0434\u043d\u0430\u043a\u043e, \u044d\u0442\u043e \u0437\u0430\u0431\u043b\u0443\u0436\u0434\u0435\u043d\u0438\u0435. \u0427\u0438\u0442\u0430\u0435\u043c \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044e \u043a <code>Executors.newFixedThreadPool(int)<\/code>:<\/p>\n<p>  <\/p>\n<blockquote><p>Creates a thread pool that reuses a fixed number of threads operating off a shared unbounded queue. At any point, at most <code>nThreads<\/code> threads will be active processing tasks. <strong>If additional tasks are submitted when all threads are active, they will wait in the queue until a thread is available<\/strong>. If any thread terminates due to a failure during execution prior to shutdown, a new one will take its place if needed to execute subsequent tasks. <strong>The threads in the pool will exist until it is explicitly shutdown<\/strong>.<\/p><\/blockquote>\n<p>\u0418\u043d\u044b\u043c\u0438 \u0441\u043b\u043e\u0432\u0430\u043c\u0438, \u0435\u0441\u043b\u0438 \u0438\u0441\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c \u043e 10 \u043f\u043e\u0442\u043e\u043a\u0430\u0445 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442 \u043d\u0430 \u0432\u0445\u043e\u0434 \u0435\u0449\u0451 \u043e\u0434\u043d\u0443 \u0437\u0430\u0434\u0430\u0447\u0443 \u0438 \u0441\u0432\u043e\u0431\u043e\u0434\u043d\u044b\u0445 \u043f\u043e\u0442\u043e\u043a\u043e\u0432 \u043d\u0435\u0442, \u0442\u043e \u043f\u0440\u0438\u0434\u0451\u0442\u0441\u044f \u0436\u0434\u0430\u0442\u044c. \u041a\u0430\u0436\u0435\u0442\u0441\u044f, \u043d\u0438\u0447\u0435\u0433\u043e \u0441\u0442\u0440\u0430\u0448\u043d\u043e\u0433\u043e \u0437\u0434\u0435\u0441\u044c \u043d\u0435\u0442, \u0432\u0435\u0434\u044c \u043e\u0434\u043d\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e \u0443 \u043d\u0430\u0441 \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043d\u0435 \u0431\u043e\u043b\u0435\u0435 10 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432. \u041f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u043d\u0430\u0447\u0438\u043d\u0430\u044e\u0442\u0441\u044f, \u043a\u043e\u0433\u0434\u0430 \u043a \u043d\u0430\u0448\u0435\u043c\u0443 \u0410\u041f\u0418 \u043e\u0431\u0440\u0430\u0449\u0430\u0435\u0442\u0441\u044f 2 \u0438 \u0431\u043e\u043b\u0435\u0435 \u043a\u043b\u0438\u0435\u043d\u0442\u043e\u0432. \u041f\u0440\u0435\u0434\u043f\u043e\u043b\u043e\u0436\u0438\u043c, \u043d\u0430\u0448 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440 \u043f\u043e\u043b\u0443\u0447\u0438\u043b \u0434\u0432\u0430 \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u0441 <code>count = 15<\/code> (\u0442. \u0435. \u0432\u0441\u0435\u0433\u043e \u043c\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u043e\u0442\u0434\u0430\u0442\u044c 30 \u0448\u0443\u0442\u043e\u043a), \u043d\u043e \u043e\u0434\u043d\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e \u0437\u0430\u043f\u0440\u0430\u0448\u0438\u0432\u0430\u044e\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e 10, \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0435 \u0436\u0434\u0443\u0442 \u0432 \u043e\u0447\u0435\u0440\u0435\u0434\u0438. \u041a\u043e\u043d\u0435\u0447\u043d\u043e, \u0437\u0430\u043f\u0440\u043e\u0441 1 \u0448\u0443\u0442\u043a\u0438 \u0437\u0430\u043d\u0438\u043c\u0430\u0435\u0442 \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0438 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0430 \u043f\u043e\u0442\u043e\u043a\u043e\u0432 \u043d\u0435 \u0441\u0442\u043e\u043b\u044c \u0437\u0430\u043c\u0435\u0442\u043d\u043e. \u0422\u0435\u043f\u0435\u0440\u044c \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u0437\u0430\u043c\u0435\u0434\u043b\u0438\u043c \u043a\u043e\u0434<\/p>\n<p>  <\/p>\n<pre><code class=\"java\">private Future&lt;JokeDto> fetchAJoke() {   return executor.submit(() -> {     TimeUnit.SECONDS.sleep(2);     return new JokeDto();   }); }<\/code><\/pre>\n<p>  <\/p>\n<p>\u0438 \u0443\u0432\u0435\u043b\u0438\u0447\u0438\u043c \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u0443 (\u0441\u043c. <code>JokeControllerConcurrentTest<\/code> \u0432 \u0432\u0435\u0442\u043a\u0435 <code>reworked<\/code>):<\/p>\n<p>  <\/p>\n<pre><code class=\"java\">@ParameterizedTest @ValueSource(ints = {2, 4, 6, 8}) void getJokesWithSimultaneousRequests(int simultaneousRequestCount) throws Exception {   var latch = new CountDownLatch(1);   var futures = new CompletableFuture&lt;?>[simultaneousRequestCount];   for (int i = 0; i &lt; simultaneousRequestCount; i++) {     futures[i] = CompletableFuture.runAsync(() -> sendRequest(latch));   }   latch.countDown();   CompletableFuture.allOf(futures).get(); }  private void sendRequest(CountDownLatch latch) {   waitOnLatch(latch);   log.info(\"Sending request to server\");   var uriComponents = UriComponentsBuilder.fromHttpUrl(getHttpUrl())           .queryParam(\"count\", 15)           .build();   var stopWatch = new StopWatch();   stopWatch.start();   var response = restTemplate.exchange(           uriComponents.encode().toUri(),           HttpMethod.GET,           HttpEntity.EMPTY,           responseType);   stopWatch.stop();   log.info(\"Request took {} millis\", stopWatch.getTotalTimeMillis());   assertTrue(response.getStatusCode().is2xxSuccessful()); }  @SneakyThrows private static void waitOnLatch(CountDownLatch latch) {   latch.await(); }<\/code><\/pre>\n<p>  <\/p>\n<p>\u041e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435, \u0447\u0442\u043e \u0431\u0435\u0437 \u0438\u0441\u043a\u0443\u0441\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0433\u043e \u0437\u0430\u043c\u0435\u0434\u043b\u0435\u043d\u0438\u044f \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u044b\u0439 \u0442\u0435\u0441\u0442 \u043c\u043e\u0436\u0435\u0442 \u043f\u0430\u0434\u0430\u0442\u044c \u0441 <code>429 Too Many Requests<\/code>, \u2013 \u044d\u0442\u043e \u043d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u043e \u0434\u043b\u044f \u0441\u0435\u0440\u0432\u0438\u0441\u0430 \u0441 \u0437\u0430\u0449\u0438\u0442\u043e\u0439 \u043e\u0442 DoS.<\/p>\n<p>  <\/p>\n<p>\u0417\u0430\u043f\u0443\u0441\u0442\u0438\u0432 \u0442\u0435\u0441\u0442 \u0441 \u0438\u0441\u0445\u043e\u0434\u043d\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0435\u0439 \u043a\u043e\u0434\u0430 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0443\u044e \u043a\u0430\u0440\u0442\u0438\u043d\u0443:<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">requestCount = 2 Request took 6300 millis Request took 6300 millis  requestCount = 4 Request took 10040 millis Request took 10041 millis Request took 12050 millis Request took 12050 millis  requestCount = 6 Request took 14069 millis Request took 14070 millis Request took 16081 millis Request took 16081 millis Request took 18085 millis Request took 18085 millis  requestCount = 8 Request took 18085 millis Request took 18085 millis Request took 20093 millis Request took 20093 millis Request took 22102 millis Request took 22103 millis Request took 24108 millis Request took 24107 millis<\/code><\/pre>\n<p>  <\/p>\n<p>\u0421 \u0440\u043e\u0441\u0442\u043e\u043c \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u0437\u0430\u043c\u0435\u0434\u043b\u044f\u0435\u0442\u0441\u044f \u043f\u0440\u043e\u043f\u043e\u0440\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e \u0438\u0445 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0443.<\/p>\n<\/div><\/div>\n<p>  <\/p>\n<p>\u0420\u0435\u0448\u0438\u0442\u044c \u044d\u0442\u0443 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0443 \u043c\u043e\u0436\u043d\u043e \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e <code>Executors.newCachedThreadPool()<\/code>.<\/p>\n<p>  <\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">\u0417\u0430\u043c\u0435\u0434\u043b\u0435\u043d\u0438\u0435 \u043f\u0440\u0438 \u0440\u043e\u0441\u0442\u0435 \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u0441\u0445\u043e\u0434\u0438\u0442 \u043d\u0430 \u043d\u0435\u0442:<\/b>                         <\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"plaintext\">requestCount = 2 Request took 4287 millis Request took 4287 millis  requestCount = 4 Request took 4022 millis Request took 4021 millis Request took 4033 millis Request took 4033 millis  requestCount = 6 Request took 4016 millis Request took 4017 millis Request took 4016 millis Request took 4029 millis Request took 4030 millis Request took 4031 millis  requestCount = 8 Request took 4014 millis Request took 4014 millis Request took 4014 millis Request took 4014 millis Request took 4014 millis Request took 4015 millis Request took 4027 millis Request took 4028 millis<\/code><\/pre>\n<\/div><\/div>\n<p>  <\/p>\n<p>\u041e\u0431\u0449\u0435\u0435 \u0436\u0435 \u0432\u0440\u0435\u043c\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f <code>JokeControllerConcurrentTest<\/code> \u0441\u043d\u0438\u0436\u0430\u0435\u0442\u0441\u044f \u0441 1 \u043c\u0438\u043d\u0443\u0442\u044b \u0434\u043e 16-17 \u0441\u0435\u043a\u0443\u043d\u0434.<\/p>\n<p>  <\/p>\n<p>\u0421\u043c\u043e\u0442\u0440\u0438\u043c \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044e <code>Executors.newCachedThreadPool()<\/code>:<\/p>\n<p>  <\/p>\n<blockquote><p>Creates a thread pool that creates new threads as needed, but will reuse previously constructed threads when they are available. <strong>These pools will typically improve the performance of programs that execute many short-lived asynchronous tasks<\/strong>. Calls to execute will reuse previously constructed threads if available. <strong>If no existing thread is available, a new thread will be created and added to the pool. Threads that have not been used for sixty seconds are terminated and removed from the cache. Thus, a pool that remains idle for long enough will not consume any resources<\/strong>.<\/p><\/blockquote>\n<p>\u0414\u043b\u044f \u043d\u0430\u0448\u0435\u0433\u043e \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u044f \u044d\u0442\u043e\u0442 \u0438\u0441\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c \u043f\u043e\u0434\u0445\u043e\u0434\u0438\u0442 \u043a\u0430\u043a \u043d\u0435\u043b\u044c\u0437\u044f \u043b\u0443\u0447\u0448\u0435 \u0432\u0432\u0438\u0434\u0443 \u0435\u0433\u043e \u0441\u043f\u043e\u0441\u043e\u0431\u043d\u043e\u0441\u0442\u0438 \u0440\u0430\u0441\u0448\u0438\u0440\u044f\u0442\u044c\u0441\u044f\/\u0441\u0436\u0438\u043c\u0430\u0442\u044c\u0441\u044f \u043f\u0440\u0438 \u0440\u043e\u0441\u0442\u0435\/\u043f\u0430\u0434\u0435\u043d\u0438\u0438 \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u0438, \u0447\u0442\u043e \u043c\u044b \u0438 \u043d\u0430\u0431\u043b\u044e\u0434\u0430\u0435\u043c \u0432 \u0442\u0435\u0441\u0442\u0430\u0445.<\/p>\n<p>  <\/p>\n<p>\u0420\u0430\u0437\u0443\u043c\u0435\u0435\u0442\u0441\u044f, \u0438 \u0437\u0434\u0435\u0441\u044c \u0435\u0441\u0442\u044c \u0441\u0432\u043e\u0438 \u043f\u043e\u0434\u0432\u043e\u0434\u043d\u044b\u0435 \u043a\u0430\u043c\u043d\u0438, \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0435 \u0441 \u0440\u043e\u0441\u0442\u043e\u043c \u043f\u043e\u0442\u0440\u0435\u0431\u043b\u0435\u043d\u0438\u044f \u043f\u0430\u043c\u044f\u0442\u0438 \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u0430 \u043f\u043e\u0442\u043e\u043a\u043e\u0432 \u0438 \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e\u0441\u0442\u044c\u044e \u0440\u0430\u0441\u043f\u0430\u0440\u0430\u043b\u043b\u0435\u043b\u0438\u0432\u0430\u043d\u0438\u044f (\u044f\u0434\u0435\u0440 \u043c\u043e\u0436\u0435\u0442 \u043d\u0435 \u0445\u0432\u0430\u0442\u0438\u0442\u044c \u043d\u0430 \u0432\u0441\u0435\u0445).<\/p>\n<p>  <\/p>\n<p>\u0415\u0449\u0451 \u043e\u0434\u043d\u0430 \u043c\u043e\u044f \u043d\u0435\u0434\u043e\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u2013 \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0438\u0435 \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e\u0433\u043e \u0437\u0430\u043a\u0440\u044b\u0442\u0438\u044f \u0438\u0441\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044f, \u0447\u0442\u043e \u0432 \u0442\u0435\u043e\u0440\u0438\u0438 \u043c\u043e\u0436\u0435\u0442 \u043f\u0440\u0438\u0432\u0435\u0441\u0442\u0438 \u043a \u043f\u043e\u0442\u0435\u0440\u0435 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u043c\u043e\u0433\u043e \u0434\u043e\u0447\u0435\u0440\u043d\u0438\u043c \u043f\u043e\u0442\u043e\u043a\u043e\u043c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430 \u043f\u0440\u0438 \u043e\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f. \u041f\u043e-\u0445\u043e\u0440\u043e\u0448\u0435\u043c\u0443 \u0438\u0441\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044e \u043d\u0443\u0436\u043d\u043e \u0434\u0430\u0442\u044c \u0432\u0440\u0435\u043c\u044f \u0434\u043b\u044f \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u044f \u043d\u0430\u0447\u0430\u0442\u043e\u0433\u043e \u0438 \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u0442\u043e\u043c \u0442\u0443\u0448\u0438\u0442\u044c \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442:<\/p>\n<p>  <\/p>\n<pre><code class=\"java\">@PreDestroy @SneakyThrows void shutdownExecutor() {   executor.shutdown();   if (!executor.awaitTermination(5, TimeUnit.SECONDS)) {     executor.shutdownNow();   } }<\/code><\/pre>\n<p>  <\/p>\n<p>\u0422\u0430\u043a\u0436\u0435 \u043c\u043d\u0435 \u0437\u0430\u0434\u0430\u043b\u0438 \u0432\u043e\u043f\u0440\u043e\u0441, \u043a\u0430\u043a\u043e\u0439 \u0438\u0437 \u0441\u043b\u043e\u0451\u0432 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0441\u0442\u043e\u0438\u0442 \u043e\u043f\u0438\u0441\u0430\u0442\u044c \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430.<\/p>\n<p>  <\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">\u0417\u0434\u0435\u0441\u044c \u0441\u043e\u0432\u0441\u0435\u043c \u043f\u0440\u043e\u0441\u0442\u043e<\/b>                         <\/p>\n<div class=\"spoiler_text\">\n<p>\u041f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u0434\u043b\u044f \u043d\u0430\u0441 \u0432\u0430\u0436\u0435\u043d \u0444\u043e\u0440\u043c\u0430\u0442 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u0445, \u0430 \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a \u0432\u0442\u043e\u0440\u0438\u0447\u0435\u043d (\u0432 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u043d\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u044d\u0442\u043e OpenFeign), \u0435\u0433\u043e \u0438 \u043d\u0443\u0436\u043d\u043e \u0432\u044b\u0434\u0435\u043b\u0438\u0442\u044c \u0432 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441. \u0415\u0441\u043b\u0438 \u0437\u0430\u0432\u0442\u0440\u0430 \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0434\u043e\u0441\u0442\u0430\u0432\u0430\u0442\u044c \u0448\u0443\u0442\u043a\u0438 \u0438\u0437 \u043a\u044d\u0448\u0430 \u0438\u043b\u0438 \u0431\u0430\u0437\u044b, \u0442\u043e \u043c\u044b \u043f\u0440\u043e\u0441\u0442\u043e \u043f\u043e\u0434\u0441\u0442\u0430\u0432\u0438\u043c \u0434\u0440\u0443\u0433\u0443\u044e \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e.<\/p>\n<\/div><\/div>\n<p>  <\/p>\n<p>\u0418 \u043f\u043e \u043c\u0435\u043b\u043e\u0447\u0438 \u0432 <code>.gitignore<\/code> \u0441\u0442\u043e\u0438\u0442 \u044f\u0432\u043d\u043e \u043f\u0440\u043e\u043f\u0438\u0441\u0430\u0442\u044c <code>\/.mvn\/wrapper\/maven-wrapper.jar<\/code>, \u0434\u0430\u0431\u044b \u043d\u0435 \u0442\u0430\u0449\u0438\u0442\u044c \u044d\u0442\u043e\u0442 \u0444\u0430\u0439\u043b \u0432 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439 (\u0432\u0441\u0451 \u0440\u0430\u0432\u043d\u043e \u043e\u043d \u0432\u044b\u043a\u0430\u0447\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u043f\u0440\u0438 \u043f\u0435\u0440\u0432\u043e\u0439 \u0441\u0431\u043e\u0440\u043a\u0435 \u043f\u0440\u043e\u0435\u043a\u0442\u0430) \u0438 \u043d\u0435 \u043e\u0442\u0441\u043b\u0435\u0436\u0438\u0432\u0430\u0442\u044c \u0435\u0433\u043e \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u043f\u0440\u0438 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0438 \u0432\u0435\u0440\u0441\u0438\u0438 \u041c\u0430\u0432\u0435\u043d\u0430.<\/p>\n<p>  <\/p>\n<p>\u041d\u0430 \u044d\u0442\u043e\u043c \u0432\u0441\u0451, \u043d\u0430\u0434\u0435\u044e\u0441\u044c, \u0438\u0437 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0438 \u0432\u044b \u043f\u043e\u0447\u0435\u0440\u043f\u043d\u0443\u043b\u0438 \u0434\u043b\u044f \u0441\u0435\u0431\u044f \u0447\u0442\u043e-\u0442\u043e \u043d\u043e\u0432\u043e\u0435 \u0438 \u043f\u043e\u043b\u0435\u0437\u043d\u043e\u0435. \u0414\u043e \u043d\u043e\u0432\u044b\u0445 \u0432\u0441\u0442\u0440\u0435\u0447!<\/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\/784754\/\"> https:\/\/habr.com\/ru\/articles\/784754\/<\/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-1\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u041f\u0440\u0438\u0432\u0435\u0442, \u043e\u0431\u044b\u0447\u043d\u043e \u043f\u0430\u0440\u0443 \u0440\u0430\u0437 \u0432 \u0433\u043e\u0434 \u044f \u0445\u043e\u0436\u0443 \u043d\u0430 \u0441\u043e\u0431\u0435\u0441\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u044f \u0431\u0435\u0437 \u043d\u0430\u043c\u0435\u0440\u0435\u043d\u0438\u044f \u043c\u0435\u043d\u044f\u0442\u044c \u0440\u0430\u0431\u043e\u0442\u0443, \u0430 \u0434\u043b\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u043d\u043e\u0432\u043e\u0433\u043e \u043e\u043f\u044b\u0442\u0430 \u0438 \u0432 \u043f\u043e\u0438\u0441\u043a\u0430\u0445 \u0430\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u043e\u0442\u0432\u0435\u0442\u0430 \u043d\u0430 \u0432\u043e\u043f\u0440\u043e\u0441 &#171;\u0410 \u0447\u0442\u043e \u0441\u0435\u0439\u0447\u0430\u0441 \u0441\u043f\u0440\u0430\u0448\u0438\u0432\u0430\u044e\u0442?&#187;<\/p>\n<p>  <\/p>\n<p>\u0427\u0430\u0441\u0442\u043e \u0442\u0430\u043c \u0437\u0430\u0434\u0430\u044e\u0442 \u043e\u0431\u044b\u0447\u043d\u044b\u0435, \u0434\u0430\u0436\u0435 \u0441\u043a\u0443\u0447\u043d\u044b\u0435 \u0432\u043e\u043f\u0440\u043e\u0441\u044b \u0432\u0440\u043e\u0434\u0435 &#171;\u0440\u0430\u0441\u0441\u043a\u0430\u0436\u0438\u0442\u0435 \u043e \u043a\u043e\u043d\u0442\u0440\u0430\u043a\u0442\u0435 \u043c\u0435\u0436\u0434\u0443 <code>equals()<\/code>\u0438 <code>hashCode()<\/code>&#171;, \u043d\u043e \u0438\u043d\u043e\u0433\u0434\u0430 \u043f\u043e\u043f\u0430\u0434\u0430\u044e\u0442\u0441\u044f \u043e\u0447\u0435\u043d\u044c \u0443\u043c\u043d\u044b\u0435 \u0438 \u043f\u0440\u0438\u044f\u0442\u043d\u044b\u0435 \u0438\u043d\u0442\u0435\u0440\u0432\u044c\u044e\u0435\u0440\u044b, \u043f\u0440\u043e\u0432\u043e\u0434\u044f\u0449\u0438\u0435 \u0441\u043e\u0431\u0435\u0441\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u0435 \u0432\u0434\u0443\u043c\u0447\u0438\u0432\u043e, \u0440\u0430\u0441\u0441\u043f\u0440\u0430\u0448\u0438\u0432\u0430\u044e\u0449\u0438\u0435 \u043e \u0442\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438\u044f\u0445, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0445 \u043d\u0430 \u0446\u0435\u043b\u0435\u0432\u043e\u043c \u043f\u0440\u043e\u0435\u043a\u0442\u0435 (\u0430 \u043d\u0435 \u043e\u0431 \u0430\u0431\u0441\u0442\u0440\u0430\u043a\u0442\u043d\u043e\u043c <code>volatile<\/code>), \u0441\u0442\u0430\u0432\u044f\u0449\u0438\u0435 \u043d\u0435\u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0435 \u0432\u043e\u043f\u0440\u043e\u0441\u044b \u0438 \u0437\u0430\u0434\u0430\u0447\u0438. \u0421\u0435\u0433\u043e\u0434\u043d\u044f\u0448\u043d\u044f\u044f \u0441\u0442\u0430\u0442\u044c\u044f \u0431\u0443\u0434\u0435\u0442 \u043e\u0431 \u043e\u0434\u043d\u043e\u043c \u0438\u0437 \u0442\u0430\u043a\u0438\u0445 \u0437\u0430\u043c\u0435\u0447\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u0441\u043e\u0431\u0435\u0441\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u0439 (\u0432\u0435\u0440\u043d\u0435\u0435 \u043e \u0437\u0430\u0434\u0430\u0447\u0435) \u0438 \u043e \u0432\u043e\u043f\u0440\u043e\u0441\u0430\u0445, \u043f\u043e\u0434\u043d\u044f\u0442\u044b\u0445 \u0432 \u0445\u043e\u0434\u0435 \u0435\u0451 \u043e\u0431\u0441\u0443\u0436\u0434\u0435\u043d\u0438\u044f.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-364649","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/364649","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=364649"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/364649\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=364649"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=364649"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=364649"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}