{"id":289203,"date":"2018-09-10T17:20:02","date_gmt":"2018-09-10T13:20:02","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=289203"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=289203","title":{"rendered":"\u0420\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0441\u0432\u043e\u0435\u0433\u043e IoC \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430 \u0438\u043b\u0438 \u0434\u043e\u043b\u043e\u0439 Spring \u0432 \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0435\u043c"},"content":{"rendered":"\n<div class=\"post__text post__text-html js-mediator-article\"><img decoding=\"async\" src=\"https:\/\/sa0blogs.blob.core.windows.net\/devkimchi\/2017\/11\/azure-functions-with-ioc-container-01.png\" alt=\"image\"\/>  <\/p>\n<h2>\u0412\u0432\u0435\u0434\u0435\u043d\u0438\u0435<\/h2>\n<p>  \u041a\u0430\u0436\u0434\u044b\u0439 \u043d\u0430\u0447\u0438\u043d\u0430\u044e\u0449\u0438\u0439 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u0437\u043d\u0430\u043a\u043e\u043c \u0441 \u043f\u043e\u043d\u044f\u0442\u0438\u0435\u043c Inversion of Control (\u0418\u043d\u0432\u0435\u0440\u0441\u0438\u044f \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f).<\/p>\n<p>  \u041f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043a\u0430\u0436\u0434\u044b\u0439 \u043d\u043e\u0432\u044b\u0439 \u043f\u0440\u043e\u0435\u043a\u0442 \u0441\u0435\u0439\u0447\u0430\u0441 \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u0442\u0441\u044f \u0441 \u0432\u044b\u0431\u043e\u0440\u0430 \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u0430, \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u0431\u0443\u0434\u0435\u0442 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d \u043f\u0440\u0438\u043d\u0446\u0438\u043f \u0432\u043d\u0435\u0434\u0440\u0435\u043d\u0438\u044f \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0435\u0439.<\/p>\n<p>  \u0418\u043d\u0432\u0435\u0440\u0441\u0438\u044f \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f (Inversion of Control, IoC) \u2014 \u0432\u0430\u0436\u043d\u044b\u0439 \u043f\u0440\u0438\u043d\u0446\u0438\u043f \u043e\u0431\u044a\u0435\u043a\u0442\u043d\u043e-\u043e\u0440\u0438\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0439 \u0434\u043b\u044f \u0443\u043c\u0435\u043d\u044c\u0448\u0435\u043d\u0438\u044f \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u043e\u0441\u0442\u0438 \u0432 \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u043d\u044b\u0445 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430\u0445 \u0438 \u0432\u0445\u043e\u0434\u044f\u0449\u0438\u0439 \u0432 \u043f\u044f\u0442\u0435\u0440\u043a\u0443 \u0432\u0430\u0436\u043d\u0435\u0439\u0448\u0438\u0445 \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u043e\u0432 SOLID.<\/p>\n<p>  \u041d\u0430 \u0441\u0435\u0433\u043e\u0434\u043d\u044f \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0442 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u0445 \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u043e\u0432 \u043f\u043e \u044d\u0442\u043e\u0439 \u0442\u0435\u043c\u0435:<\/p>\n<p>  1. <a href=\"http:\/\/square.github.io\/dagger\/\">Dagger<\/a><br \/>  2. <a href=\"https:\/\/code.google.com\/p\/google-guice\">Google Guice<\/a><br \/>  3. <a href=\"https:\/\/spring.io\/projects\/spring-framework\">Spring Framework<\/a><\/p>\n<p>  \u041f\u043e \u0441\u0435\u0439 \u0434\u0435\u043d\u044c \u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0441\u044c Spring \u0438 \u0447\u0430\u0441\u0442\u0438\u0447\u043d\u043e \u0434\u043e\u0432\u043e\u043b\u0435\u043d \u0435\u0433\u043e \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u043e\u043c, \u043d\u043e \u043f\u043e\u0440\u0430 \u0431\u044b \u043f\u043e\u043f\u0440\u043e\u0431\u043e\u0432\u0430\u0442\u044c \u0447\u0442\u043e-\u0442\u043e \u0438 \u0441\u0432\u043e\u0435, \u043d\u0435 \u043f\u0440\u0430\u0432\u0434\u0430 \u043b\u0438?<\/p>\n<h3>\u041e \u0441\u0435\u0431\u0435<\/h3>\n<p>  \u0417\u043e\u0432\u0443\u0442 \u043c\u0435\u043d\u044f \u041d\u0438\u043a\u0438\u0442\u0430, \u043c\u043d\u0435 24 \u0433\u043e\u0434\u0430, \u0438 \u044f \u0437\u0430\u043d\u0438\u043c\u0430\u044e\u0441\u044c java (backend) \u043d\u0430 \u043f\u0440\u043e\u0442\u044f\u0436\u0435\u043d\u0438\u0438 3 \u043b\u0435\u0442. \u041e\u0431\u0443\u0447\u0430\u043b\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u043d\u0430 \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u043f\u0440\u0438\u043c\u0435\u0440\u0430\u0445, \u043f\u0430\u0440\u0430\u043b\u043b\u0435\u043b\u044c\u043d\u043e \u043f\u044b\u0442\u0430\u044f\u0441\u044c \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u0442\u044c\u0441\u044f \u0432 \u0441\u043f\u0435\u043a\u0430\u0445 \u043a\u043b\u0430\u0441\u0441\u043e\u0432. \u041d\u0430 \u0434\u0430\u043d\u043d\u044b\u0439 \u043c\u043e\u043c\u0435\u043d\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u044e (freelance) \u2014 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u0435 CMS \u0434\u043b\u044f \u043a\u043e\u043c\u043c\u0435\u0440\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u043f\u0440\u043e\u0435\u043a\u0442\u0430, \u0433\u0434\u0435 \u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e Spring Boot. \u041d\u0435\u0434\u0430\u0432\u043d\u043e \u043f\u043e\u0441\u0435\u0442\u0438\u043b\u0430 \u043c\u044b\u0441\u043b\u044c \u2014 \u00ab\u041f\u043e\u0447\u0435\u043c\u0443 \u0431\u044b \u043d\u0435 \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0441\u0432\u043e\u0439 IoC (DI) Container \u043f\u043e \u0441\u0432\u043e\u0435\u043c\u0443 \u0432\u0438\u0434\u0435\u043d\u0438\u044e \u0438 \u0436\u0435\u043b\u0430\u043d\u0438\u044e?\u00bb. \u0413\u0440\u0443\u0431\u043e \u0433\u043e\u0432\u043e\u0440\u044f \u2014 \u00ab\u0417\u0430\u0445\u043e\u0442\u0435\u043b\u043e\u0441\u044c \u0441\u0432\u043e\u0435\u0433\u043e \u0441 \u0431\u043b\u0435\u043a\u0434\u0436\u0435\u043a\u043e\u043c&#8230;\u00bb. \u041e\u0431 \u044d\u0442\u043e\u043c \u0438 \u043f\u043e\u0439\u0434\u0435\u0442 \u0441\u0435\u0433\u043e\u0434\u043d\u044f \u0440\u0435\u0447\u044c. \u0427\u0442\u043e \u0436, \u043f\u0440\u043e\u0448\u0443 \u043f\u043e\u0434 \u043a\u0430\u0442. <a href=\"https:\/\/github.com\/GenCloud\/di_container\">\u0421\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u0438\u0441\u0445\u043e\u0434\u043d\u0438\u043a\u0438 \u043f\u0440\u043e\u0435\u043a\u0442\u0430<\/a>.<\/p>\n<h3>\u0421\u0442\u0430\u0440\u0442\u043e\u0432\u0430\u044f \u0442\u043e\u0447\u043a\u0430 \u0438\u043b\u0438 \u043a\u0430\u043a \u044d\u0442\u043e \u0432\u0441\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442<\/h3>\n<p>  \u041f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0435\u043c \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043f\u0440\u043e\u0435\u043a\u0442\u0430:<\/p>\n<pre><code class=\"xml\">   &lt;repositories&gt;         &lt;repository&gt;             &lt;id&gt;di_container-mvn-repo&lt;\/id&gt;             &lt;url&gt;https:\/\/raw.github.com\/GenCloud\/di_container\/mvn-repo\/&lt;\/url&gt;             &lt;snapshots&gt;                 &lt;enabled&gt;true&lt;\/enabled&gt;                 &lt;updatePolicy&gt;always&lt;\/updatePolicy&gt;             &lt;\/snapshots&gt;         &lt;\/repository&gt;     &lt;\/repositories&gt;  ...      &lt;dependencies&gt;         &lt;dependency&gt;             &lt;groupId&gt;org.genfork&lt;\/groupId&gt;             &lt;artifactId&gt;context&lt;\/artifactId&gt;             &lt;version&gt;0.0.1-ALPHA&lt;\/version&gt;         &lt;\/dependency&gt;     &lt;\/dependencies&gt;  <\/code><\/pre>\n<p><a name=\"habracut\"><\/a><br \/>  \u0422\u0435\u0441\u0442\u043e\u0432\u044b\u0439 \u043a\u043b\u0430\u0441\u0441 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f.<\/p>\n<pre><code class=\"java\">@ScanPackage(packages = {&quot;org.di.test&quot;, &quot;org.di&quot;}) public class MainTest {     public static void main(String... args) {         IoCStarter.start(MainTest.class, args);     } } <\/code><\/pre>\n<p>  **\u041f\u043e\u044f\u0441\u043d\u0435\u043d\u0438\u044f:<br \/>  <b>\u0410\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u044f @ScanPackage<\/b> \u2014 \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0443, \u043a\u0430\u043a\u0438\u0435 \u043f\u0430\u043a\u0435\u0442\u044b \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u0441\u043a\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0434\u043b\u044f \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043e\u0432 (\u043a\u043b\u0430\u0441\u0441\u043e\u0432) \u0434\u043b\u044f \u0438\u0445 \u0438\u043d\u044a\u0435\u043a\u0446\u0438\u0438. \u0415\u0441\u043b\u0438 \u043f\u0430\u043a\u0435\u0442 \u043d\u0435 \u0443\u043a\u0430\u0437\u0430\u043d, \u0431\u0443\u0434\u0435\u0442 \u0441\u043a\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u043f\u0430\u043a\u0435\u0442 \u043a\u043b\u0430\u0441\u0441\u0430, \u043f\u043e\u043c\u0435\u0447\u0435\u043d\u043d\u043e\u0433\u043e \u044d\u0442\u043e\u0439 \u0430\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u0435\u0439.<\/p>\n<p>  <b>IoCStarter#start(Object, String&#8230;)<\/b> \u2014 \u0442\u043e\u0447\u043a\u0430 \u0432\u0445\u043e\u0434\u0430 \u0438 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0430 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f.<\/p>\n<p>  \u0414\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043a\u043b\u0430\u0441\u0441\u043e\u0432-\u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043e\u0432 \u0434\u043b\u044f \u043d\u0435\u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0439 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u0430.<\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">ComponentA<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"java\">@IoCComponent @LoadOpt(PROTOTYPE) public class ComponentA {     @Override     public String toString() {         return &quot;ComponentA{&quot; + Integer.toHexString(hashCode()) + &quot;}&quot;;     } } <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">ComponentB<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"java\">@IoCComponent public class ComponentB {     @IoCDependency     private ComponentA componentA;      @IoCDependency     private ExampleEnvironment exampleEnvironment;      @Override     public String toString() {         return &quot;ComponentB{hash: &quot; + Integer.toHexString(hashCode()) + &quot;, componentA=&quot; + componentA +                 &quot;, exampleEnvironment=&quot; + exampleEnvironment +                 '}';     } } <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">ComponentC<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"java\">@IoCComponent public class ComponentC {     private final ComponentB componentB;     private final ComponentA componentA;      @IoCDependency     public ComponentC(ComponentB componentB, ComponentA componentA) {         this.componentB = componentB;         this.componentA = componentA;     }      @Override     public String toString() {         return &quot;ComponentC{hash: &quot; + Integer.toHexString(hashCode()) + &quot;, componentB=&quot; + componentB +                 &quot;, componentA=&quot; + componentA +                 '}';     } } <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">ComponentD<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"java\">@IoCComponent public class ComponentD {     @IoCDependency     private ComponentB componentB;     @IoCDependency     private ComponentA componentA;     @IoCDependency     private ComponentC componentC;      @Override     public String toString() {         return &quot;ComponentD{hash: &quot; + Integer.toHexString(hashCode()) + &quot;, ComponentB=&quot; + componentB +                 &quot;, ComponentA=&quot; + componentA +                 &quot;, ComponentC=&quot; + componentC +                 '}';     } } <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  * \u041f\u0440\u0438\u043c\u0435\u0447\u0430\u043d\u0438\u044f:<br \/>   \u2014 \u0446\u0438\u043a\u043b\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043d\u0435 \u043f\u0440\u0435\u0434\u0443\u0441\u043c\u043e\u0442\u0440\u0435\u043d\u044b, \u0441\u0442\u043e\u0438\u0442 \u0437\u0430\u0433\u043b\u0443\u0448\u043a\u0430 \u0432 \u0432\u0438\u0434\u0435 \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439, \u0432 \u0441\u0432\u043e\u044e \u043e\u0447\u0435\u0440\u0435\u0434\u044c, \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0435 \u043a\u043b\u0430\u0441\u0441\u044b \u0438\u0437 \u043e\u0442\u0441\u043a\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u043f\u0430\u043a\u0435\u0442\u043e\u0432 \u0438 \u0432\u044b\u0431\u0440\u0430\u0441\u044b\u0432\u0430\u0435\u0442 \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435, \u0435\u0441\u043b\u0438 \u0438\u043c\u0435\u0435\u0442\u0441\u044f \u0446\u0438\u043a\u043b\u0438\u043a\u0430.<br \/>  **\u041f\u043e\u044f\u0441\u043d\u0435\u043d\u0438\u044f:<br \/>  <b>\u0410\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u044f @IoCComponent<\/b> \u2014 \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0443, \u0447\u0442\u043e \u044d\u0442\u043e \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442 \u0438 \u0435\u0433\u043e \u043d\u0443\u0436\u043d\u043e \u043f\u0440\u043e\u0430\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0434\u043b\u044f \u0432\u044b\u044f\u0432\u043b\u0435\u043d\u0438\u044f \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0435\u0439 (\u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u0430\u044f \u0430\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u044f).<\/p>\n<p>  <b>\u0410\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u044f @IoCDependency<\/b> \u2014 \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u0443, \u0447\u0442\u043e \u044d\u0442\u043e \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u044c \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430 \u0438 \u0435\u0435 \u043d\u0443\u0436\u043d\u043e \u0438\u043d\u0441\u0442\u0430\u043d\u0446\u0438\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442.<\/p>\n<p>  <b>\u0410\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u044f @LoadOpt<\/b> \u2014 \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0443, \u043a\u0430\u043a\u043e\u0439 \u0442\u0438\u043f \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430 \u043d\u0443\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c. \u0412 \u0434\u0430\u043d\u043d\u044b\u0439 \u043c\u043e\u043c\u0435\u043d\u0442 \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442\u0441\u044f 2 \u0442\u0438\u043f\u0430 \u2014 SINGLETON \u0438 PROTOTYPE (\u0435\u0434\u0438\u043d\u0438\u0447\u043d\u044b\u0439 \u0438 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439).<\/p>\n<p>  \u0420\u0430\u0441\u0448\u0438\u0440\u0438\u043c \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e main-\u043a\u043b\u0430\u0441\u0441\u0430:<\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">MainTest<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"java\">@ScanPackage(packages = {&quot;org.di.test&quot;, &quot;org.di&quot;}) public class MainTest {     private static final Logger log = LoggerFactory.getLogger(MainTest.class);      public static void main(String... args) {         BasicConfigurator.configure();          final AppContext context = IoCStarter.start(MainTest.class, args);         printStatistic(context);          log.info(&quot;Getting ComponentA from context&quot;);         final ComponentA componentA = (ComponentA) context.getType(ComponentA.class);         log.info(componentA.toString());          log.info(&quot;Getting ComponentB from context&quot;);         final ComponentB componentB = (ComponentB) context.getType(ComponentB.class);         log.info(componentB.toString());          log.info(&quot;Getting ComponentC from context&quot;);         final ComponentC componentC = (ComponentC) context.getType(ComponentC.class);         log.info(componentC.toString());          log.info(&quot;Getting ComponentD from context&quot;);         final ComponentD componentD = (ComponentD) context.getType(ComponentD.class);         log.info(componentD.toString());     }      private static void printStatistic(AppContext context) {         DependencyFactory dependencyFactory = context.getDependencyFactory();         log.info(&quot;Initializing singleton types - {}&quot;, dependencyFactory.getSingletons().size());         log.info(&quot;Initializing proto types - {}&quot;, dependencyFactory.getPrototypes().size());          log.info(&quot;For Each singleton types&quot;);         for (Object o : dependencyFactory.getSingletons().values()) {             log.info(&quot;------- {}&quot;, o.getClass().getSimpleName());         }          log.info(&quot;For Each proto types&quot;);         for (Object o : dependencyFactory.getPrototypes().values()) {             log.info(&quot;------- {}&quot;, o.getClass().getSimpleName());         }     } } <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  \u0417\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0430\u043c\u0438 \u0412\u0430\u0448\u0435\u0439 IDE \u0438\u043b\u0438 \u043a\u043e\u043c\u0430\u043d\u0434\u043d\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u043e\u0439 \u043f\u0440\u043e\u0435\u043a\u0442.<\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"xml\">0 [main] INFO org.di.context.runner.IoCStarter  - Start initialization of context app 159 [main] DEBUG org.reflections.Reflections  - going to scan these urls: file:\/C:\/Users\/GenCloud\/Workspace\/di_container\/context\/target\/classes\/ file:\/C:\/Users\/GenCloud\/Workspace\/di_container\/context\/target\/test-classes\/ 370 [main] DEBUG org.reflections.Reflections  - could not scan file log4j2.xml in url file:\/C:\/Users\/GenCloud\/Workspace\/di_container\/context\/target\/test-classes\/ with scanner SubTypesScanner 372 [main] DEBUG org.reflections.Reflections  - could not scan file log4j2.xml in url file:\/C:\/Users\/GenCloud\/Workspace\/di_container\/context\/target\/test-classes\/ with scanner TypeAnnotationsScanner 409 [main] INFO org.reflections.Reflections  - Reflections took 213 ms to scan 2 urls, producing 18 keys and 52 values  512 [main] INFO org.di.context.runner.IoCStarter  - App context started in [0] seconds 512 [main] INFO org.di.test.MainTest  - Initializing singleton types - 4 512 [main] INFO org.di.test.MainTest  - Initializing proto types - 1 512 [main] INFO org.di.test.MainTest  - For Each singleton types 512 [main] INFO org.di.test.MainTest  - ------- ComponentC 512 [main] INFO org.di.test.MainTest  - ------- ComponentD 512 [main] INFO org.di.test.MainTest  - ------- ComponentB 512 [main] INFO org.di.test.MainTest  - ------- ExampleEnvironment 512 [main] INFO org.di.test.MainTest  - For Each proto types 512 [main] INFO org.di.test.MainTest  - ------- ComponentA 512 [main] INFO org.di.test.MainTest  - Getting configuration instance 512 [main] INFO org.di.test.MainTest  - Getting ComponentA from context 512 [main] INFO org.di.test.MainTest  - ComponentA{105fece7} 512 [main] INFO org.di.test.MainTest  - Getting ComponentB from context 513 [main] INFO org.di.test.MainTest  - ComponentB{hash: 3ec300f1, componentA=ComponentA{482cd91f}} 513 [main] INFO org.di.test.MainTest  - Getting ComponentC from context 513 [main] INFO org.di.test.MainTest  - ComponentC{hash: 123f1134, componentB=ComponentB{hash: 3ec300f1, componentA=ComponentA{482cd91f}, componentA=ComponentA{7d68ef40}} 513 [main] INFO org.di.test.MainTest  - Getting ComponentD from context 513 [main] INFO org.di.test.MainTest  - ComponentD{hash: 5b0abc94, ComponentB=ComponentB{hash: 3ec300f1, componentA=ComponentA{482cd91f}, ComponentA=ComponentA{75c072cb}, ComponentC=ComponentC{hash: 123f1134, componentB=ComponentB{hash: 3ec300f1, componentA=ComponentA{482cd91f}, componentA=ComponentA{7d68ef40}}}  Process finished with exit code 0 <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  + \u0438\u043c\u0435\u0435\u0442\u0441\u044f \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u043e\u0435 \u0430\u043f\u0438 \u043f\u0430\u0440\u0441\u0438\u043d\u0433\u0430 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0445 \u0444\u0430\u0439\u043b\u043e\u0432 (ini, xml, properties). <br \/>  \u041e\u0431\u043a\u0430\u0442\u0430\u043d\u043d\u044b\u0439 \u0442\u0435\u0441\u0442 \u043b\u0435\u0436\u0438\u0442 \u0432 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0438.<\/p>\n<h3>\u0411\u0443\u0434\u0443\u0449\u0435\u0435<\/h3>\n<p>  \u0412 \u043f\u043b\u0430\u043d\u0430\u0445 \u0440\u0430\u0441\u0448\u0438\u0440\u044f\u0442\u044c \u0438 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0442\u044c \u043f\u0440\u043e\u0435\u043a\u0442 \u043d\u0430 \u0441\u043a\u043e\u043b\u044c\u043a\u043e \u044d\u0442\u043e \u0431\u0443\u0434\u0435\u0442 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e.<\/p>\n<p>  \u0427\u0442\u043e \u044f \u0445\u043e\u0447\u0443 \u0432\u0438\u0434\u0435\u0442\u044c:<\/p>\n<ol>\n<li> \u041b\u0435\u043d\u0438\u0432\u0430\u044f \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u043e\u043c \u0430\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u0438 (<a href=\"https:\/\/habr.com\/users\/lazy\/\" class=\"user_link\">Lazy<\/a>).<\/li>\n<li> \u041f\u043e\u043b\u043d\u0430\u044f \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0430 \u0441\u043b\u0443\u0448\u0430\u0442\u0435\u043b\u0435\u0439.<\/li>\n<li> \u041f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0430 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0438\u043d\u0433\u0430 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0445 \u0444\u0443\u043d\u043a\u0446\u0438\u0439 \u0434\u043e \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0430\/\u043f\u043e\u0441\u043b\u0435.<\/li>\n<li> \u041d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u043c\u043e\u0434\u0443\u043b\u0435\u0439 \u2014 \u0441\u0435\u0442\u0435\u0432\u044b\u0435\/\u0440\u0430\u0431\u043e\u0442\u0430 \u0441 \u0431\u0430\u0437\u0430\u043c\u0438 \u0434\u0430\u043d\u043d\u044b\u0445\/\u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0439 \u0442\u0438\u043f\u043e\u0432\u044b\u0445 \u0437\u0430\u0434\u0430\u0447.<\/li>\n<li> etc. (\u043f\u0440\u0438\u0441\u043b\u0443\u0448\u0438\u0432\u0430\u044e\u0441\u044c \u043a \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f\u043c, \u0435\u0441\u043b\u0438 \u0442\u0430\u043a\u043e\u0432\u044b\u0435 \u0431\u0443\u0434\u0443\u0442)<\/li>\n<\/ol>\n<p>  \u041d\u0430 \u044d\u0442\u043e\u043c \u043f\u043e\u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u043a\u043e\u043d\u0435\u0446 \u0441\u0442\u0430\u0442\u044c\u0438.<\/p>\n<p>  \u0412\u0441\u0435\u043c \u0441\u043f\u0430\u0441\u0438\u0431\u043e. \u041d\u0430\u0434\u0435\u044e\u0441\u044c \u043a\u043e\u043c\u0443-\u0442\u043e \u043c\u043e\u0438 \u0442\u0440\u0443\u0434\u044b \u043f\u0440\u0438\u0433\u043e\u0434\u044f\u0442\u0441\u044f.<\/p><\/div>\n<p>        <script class=\"js-mediator-script\">!function(e){function t(t,n){if(!(n in e)){for(var r,a=e.document,i=a.scripts,o=i.length;o--;)if(-1!==i[o].src.indexOf(t)){r=i[o];break}if(!r){r=a.createElement(\"script\"),r.type=\"text\/javascript\",r.async=!0,r.defer=!0,r.src=t,r.charset=\"UTF-8\";var d=function(){var e=a.getElementsByTagName(\"script\")[0];e.parentNode.insertBefore(r,e)};\"[object Opera]\"==e.opera?a.addEventListener?a.addEventListener(\"DOMContentLoaded\",d,!1):e.attachEvent(\"onload\",d):d()}}}t(\"\/\/mediator.mail.ru\/script\/2820404\/\",\"_mediator\")}(window);<\/script>     <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\/post\/422857\/\"> https:\/\/habr.com\/post\/422857\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"\n<div class=\"post__text post__text-html js-mediator-article\"><img decoding=\"async\" src=\"https:\/\/sa0blogs.blob.core.windows.net\/devkimchi\/2017\/11\/azure-functions-with-ioc-container-01.png\" alt=\"image\"\/>  <\/p>\n<h2>\u0412\u0432\u0435\u0434\u0435\u043d\u0438\u0435<\/h2>\n<p>  \u041a\u0430\u0436\u0434\u044b\u0439 \u043d\u0430\u0447\u0438\u043d\u0430\u044e\u0449\u0438\u0439 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u0437\u043d\u0430\u043a\u043e\u043c \u0441 \u043f\u043e\u043d\u044f\u0442\u0438\u0435\u043c Inversion of Control (\u0418\u043d\u0432\u0435\u0440\u0441\u0438\u044f \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f).<\/p>\n<p>  \u041f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043a\u0430\u0436\u0434\u044b\u0439 \u043d\u043e\u0432\u044b\u0439 \u043f\u0440\u043e\u0435\u043a\u0442 \u0441\u0435\u0439\u0447\u0430\u0441 \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u0442\u0441\u044f \u0441 \u0432\u044b\u0431\u043e\u0440\u0430 \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u0430, \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u0431\u0443\u0434\u0435\u0442 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d \u043f\u0440\u0438\u043d\u0446\u0438\u043f \u0432\u043d\u0435\u0434\u0440\u0435\u043d\u0438\u044f \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0435\u0439.<\/p>\n<p>  \u0418\u043d\u0432\u0435\u0440\u0441\u0438\u044f \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f (Inversion of Control, IoC) \u2014 \u0432\u0430\u0436\u043d\u044b\u0439 \u043f\u0440\u0438\u043d\u0446\u0438\u043f \u043e\u0431\u044a\u0435\u043a\u0442\u043d\u043e-\u043e\u0440\u0438\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0439 \u0434\u043b\u044f \u0443\u043c\u0435\u043d\u044c\u0448\u0435\u043d\u0438\u044f \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u043e\u0441\u0442\u0438 \u0432 \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u043d\u044b\u0445 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430\u0445 \u0438 \u0432\u0445\u043e\u0434\u044f\u0449\u0438\u0439 \u0432 \u043f\u044f\u0442\u0435\u0440\u043a\u0443 \u0432\u0430\u0436\u043d\u0435\u0439\u0448\u0438\u0445 \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u043e\u0432 SOLID.<\/p>\n<p>  \u041d\u0430 \u0441\u0435\u0433\u043e\u0434\u043d\u044f \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0442 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u0445 \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u043e\u0432 \u043f\u043e \u044d\u0442\u043e\u0439 \u0442\u0435\u043c\u0435:<\/p>\n<p>  1. <a href=\"http:\/\/square.github.io\/dagger\/\">Dagger<\/a><br \/>  2. <a href=\"https:\/\/code.google.com\/p\/google-guice\">Google Guice<\/a><br \/>  3. <a href=\"https:\/\/spring.io\/projects\/spring-framework\">Spring Framework<\/a><\/p>\n<p>  \u041f\u043e \u0441\u0435\u0439 \u0434\u0435\u043d\u044c \u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0441\u044c Spring \u0438 \u0447\u0430\u0441\u0442\u0438\u0447\u043d\u043e \u0434\u043e\u0432\u043e\u043b\u0435\u043d \u0435\u0433\u043e \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u043e\u043c, \u043d\u043e \u043f\u043e\u0440\u0430 \u0431\u044b \u043f\u043e\u043f\u0440\u043e\u0431\u043e\u0432\u0430\u0442\u044c \u0447\u0442\u043e-\u0442\u043e \u0438 \u0441\u0432\u043e\u0435, \u043d\u0435 \u043f\u0440\u0430\u0432\u0434\u0430 \u043b\u0438?<\/p>\n<h3>\u041e \u0441\u0435\u0431\u0435<\/h3>\n<p>  \u0417\u043e\u0432\u0443\u0442 \u043c\u0435\u043d\u044f \u041d\u0438\u043a\u0438\u0442\u0430, \u043c\u043d\u0435 24 \u0433\u043e\u0434\u0430, \u0438 \u044f \u0437\u0430\u043d\u0438\u043c\u0430\u044e\u0441\u044c java (backend) \u043d\u0430 \u043f\u0440\u043e\u0442\u044f\u0436\u0435\u043d\u0438\u0438 3 \u043b\u0435\u0442. \u041e\u0431\u0443\u0447\u0430\u043b\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u043d\u0430 \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u043f\u0440\u0438\u043c\u0435\u0440\u0430\u0445, \u043f\u0430\u0440\u0430\u043b\u043b\u0435\u043b\u044c\u043d\u043e \u043f\u044b\u0442\u0430\u044f\u0441\u044c \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u0442\u044c\u0441\u044f \u0432 \u0441\u043f\u0435\u043a\u0430\u0445 \u043a\u043b\u0430\u0441\u0441\u043e\u0432. \u041d\u0430 \u0434\u0430\u043d\u043d\u044b\u0439 \u043c\u043e\u043c\u0435\u043d\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u044e (freelance) \u2014 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u0435 CMS \u0434\u043b\u044f \u043a\u043e\u043c\u043c\u0435\u0440\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u043f\u0440\u043e\u0435\u043a\u0442\u0430, \u0433\u0434\u0435 \u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e Spring Boot. \u041d\u0435\u0434\u0430\u0432\u043d\u043e \u043f\u043e\u0441\u0435\u0442\u0438\u043b\u0430 \u043c\u044b\u0441\u043b\u044c \u2014 \u00ab\u041f\u043e\u0447\u0435\u043c\u0443 \u0431\u044b \u043d\u0435 \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0441\u0432\u043e\u0439 IoC (DI) Container \u043f\u043e \u0441\u0432\u043e\u0435\u043c\u0443 \u0432\u0438\u0434\u0435\u043d\u0438\u044e \u0438 \u0436\u0435\u043b\u0430\u043d\u0438\u044e?\u00bb. \u0413\u0440\u0443\u0431\u043e \u0433\u043e\u0432\u043e\u0440\u044f \u2014 \u00ab\u0417\u0430\u0445\u043e\u0442\u0435\u043b\u043e\u0441\u044c \u0441\u0432\u043e\u0435\u0433\u043e \u0441 \u0431\u043b\u0435\u043a\u0434\u0436\u0435\u043a\u043e\u043c&#8230;\u00bb. \u041e\u0431 \u044d\u0442\u043e\u043c \u0438 \u043f\u043e\u0439\u0434\u0435\u0442 \u0441\u0435\u0433\u043e\u0434\u043d\u044f \u0440\u0435\u0447\u044c. \u0427\u0442\u043e \u0436, \u043f\u0440\u043e\u0448\u0443 \u043f\u043e\u0434 \u043a\u0430\u0442. <a href=\"https:\/\/github.com\/GenCloud\/di_container\">\u0421\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u0438\u0441\u0445\u043e\u0434\u043d\u0438\u043a\u0438 \u043f\u0440\u043e\u0435\u043a\u0442\u0430<\/a>.<\/p>\n<h3>\u0421\u0442\u0430\u0440\u0442\u043e\u0432\u0430\u044f \u0442\u043e\u0447\u043a\u0430 \u0438\u043b\u0438 \u043a\u0430\u043a \u044d\u0442\u043e \u0432\u0441\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442<\/h3>\n<p>  \u041f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0435\u043c \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043f\u0440\u043e\u0435\u043a\u0442\u0430:<\/p>\n<pre><code class=\"xml\">   &lt;repositories&gt;         &lt;repository&gt;             &lt;id&gt;di_container-mvn-repo&lt;\/id&gt;             &lt;url&gt;https:\/\/raw.github.com\/GenCloud\/di_container\/mvn-repo\/&lt;\/url&gt;             &lt;snapshots&gt;                 &lt;enabled&gt;true&lt;\/enabled&gt;                 &lt;updatePolicy&gt;always&lt;\/updatePolicy&gt;             &lt;\/snapshots&gt;         &lt;\/repository&gt;     &lt;\/repositories&gt;  ...      &lt;dependencies&gt;         &lt;dependency&gt;             &lt;groupId&gt;org.genfork&lt;\/groupId&gt;             &lt;artifactId&gt;context&lt;\/artifactId&gt;             &lt;version&gt;0.0.1-ALPHA&lt;\/version&gt;         &lt;\/dependency&gt;     &lt;\/dependencies&gt;  <\/code><\/pre>\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-289203","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/289203","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=289203"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/289203\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=289203"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=289203"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=289203"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}