{"id":288434,"date":"2018-08-23T21:10:02","date_gmt":"2018-08-23T17:10:02","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=288434"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=288434","title":{"rendered":"\u041a\u0430\u043a \u044f \u0438\u0437\u0443\u0447\u0430\u044e \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a Spring \u2014 \u0447\u0430\u0441\u0442\u044c 2 (\u043f\u043e\u043c\u043e\u0449\u044c \u043d\u0430\u0447\u0438\u043d\u0430\u044e\u0449\u0438\u043c \u2014 \u0434\u0435\u043b\u043e \u0440\u0443\u043a \u0441\u0430\u043c\u0438\u0445 \u043d\u0430\u0447\u0438\u043d\u0430\u044e\u0449\u0438\u0445)"},"content":{"rendered":"\n<div data-io-article-url=\"https:\/\/habr.com\/post\/421093\/\" class=\"post__text post__text-html js-mediator-article\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/vi\/74\/jo\/vi74joda-budmboowhis1myktou.jpeg\"><\/p>\n<p>  \u0414\u043e\u0431\u0440\u044b\u0439 \u0434\u0435\u043d\u044c!<\/p>\n<p>  \u042f \u0432\u0434\u043e\u0445\u043d\u043e\u0432\u0438\u043b\u0441\u044f \u043f\u0440\u0438\u0433\u043b\u0430\u0448\u0435\u043d\u0438\u0435\u043c \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0438\u0442\u044c <a href=\"https:\/\/habr.com\/post\/420901\">\u043f\u0443\u0431\u043b\u0438\u043a\u0430\u0446\u0438\u044e, <\/a> \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0430\u044e.<\/p>\n<p>  \u0412 \u044d\u0442\u043e\u0442 \u0440\u0430\u0437 \u043c\u044b \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u0435 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u044b \u0432\u043d\u0435\u0434\u0440\u0435\u043d\u0438\u044f \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u2014 \u0447\u0435\u0440\u0435\u0437 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440 \u0438 \u0447\u0435\u0440\u0435\u0437 \u0441\u0435\u0442\u0442\u0435\u0440\u044b. \u0412\u0441\u0435 \u0438\u0441\u0445\u043e\u0434\u043d\u0438\u043a\u0438 \u0438\u0441\u043a\u0430\u0442\u044c <a href=\"https:\/\/github.com\/KevinSmish\/JavaSpring\">\u0437\u0434\u0435\u0441\u044c<\/a><br \/>  <a name=\"habracut\"><\/a>  <\/p>\n<h3>\u0423\u0440\u043e\u043a 06. \u0412\u043d\u0435\u0434\u0440\u0435\u043d\u0438\u0435 \u0447\u0435\u0440\u0435\u0437 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440.<\/h3>\n<p>  \u0421\u043d\u043e\u0432\u0430 \u0432\u043e\u0437\u044c\u043c\u0435\u043c \u0437\u0430 \u043e\u0441\u043d\u043e\u0432\u0443 \u043f\u0440\u043e\u0435\u043a\u0442 \u0438\u0437 \u0443\u0440\u043e\u043a\u0430 2. <\/p>\n<p>  \u0414\u043e\u0431\u0430\u0432\u0438\u043c \u0435\u0449\u0435 \u043e\u0434\u043d\u043e\u0433\u043e \u043f\u043e\u044d\u0442\u0430. <i>src\\main\\java\\spring\\impls\\Severyanin.java<\/i><\/p>\n<pre><code class=\"java\">package spring.impls;  import spring.intarfaces.Lyricist;  public class Severyanin implements Lyricist {  \t@Override \tpublic String Generate() { \t\treturn \"\u042d\u0442\u043e \u0431\u044b\u043b\u043e \u0443 \u043c\u043e\u0440\u044f, \u0433\u0434\u0435 \u0430\u0436\u0443\u0440\u043d\u0430\u044f \u043f\u0435\u043d\u0430,\\r\\n\" + \"\u0413\u0434\u0435 \u0432\u0441\u0442\u0440\u0435\u0447\u0430\u0435\u0442\u0441\u044f \u0440\u0435\u0434\u043a\u043e \u0433\u043e\u0440\u043e\u0434\u0441\u043a\u043e\u0439 \u044d\u043a\u0438\u043f\u0430\u0436\u2026\\r\\n\" \t\t+ \"\u041a\u043e\u0440\u043e\u043b\u0435\u0432\u0430 \u0438\u0433\u0440\u0430\u043b\u0430 \u2014 \u0432 \u0431\u0430\u0448\u043d\u0435 \u0437\u0430\u043c\u043a\u0430 \u2014 \u0428\u043e\u043f\u0435\u043d\u0430,\\r\\n\" + \"\u0418, \u0432\u043d\u0438\u043c\u0430\u044f \u0428\u043e\u043f\u0435\u043d\u0443, \u043f\u043e\u043b\u044e\u0431\u0438\u043b \u0435\u0451 \u043f\u0430\u0436. \"; \t}  } <\/code><\/pre>\n<p>  \u0417\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u0443\u0435\u043c \u043a\u043b\u0430\u0441\u0441 \u0432 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u043c \u0444\u0430\u0439\u043b\u0435 <i>src\\main\\resources\\ApplicationContext.xml<\/i><\/p>\n<pre><code class=\"xml\">&lt;?xml version=\"1.0\" encoding=\"UTF-8\"?&gt; &lt;beans xmlns=\"http:\/\/www.springframework.org\/schema\/beans\" \txmlns:xsi=\"http:\/\/www.w3.org\/2001\/XMLSchema-instance\" \txsi:schemaLocation=\"http:\/\/www.springframework.org\/schema\/beans http:\/\/www.springframework.org\/schema\/beans\/spring-beans.xsd\"&gt;  \t&lt;bean id=\"LyricistBean1\" class=\"spring.impls.Poushkin\"\/&gt; \t&lt;bean id=\"LyricistBean2\" class=\"spring.impls.Mayakovsky\"\/&gt; \t&lt;bean id=\"LyricistBean3\" class=\"spring.impls.Severyanin\"\/&gt;  &lt;\/beans&gt; <\/code><\/pre>\n<p>  \u0412 \u043d\u0430\u0447\u0430\u043b\u0435 \u0434\u0432\u0430\u0434\u0446\u0430\u0442\u043e\u0433\u043e \u0432\u0435\u043a\u0430 \u0431\u044b\u043b\u0438 \u043e\u0447\u0435\u043d\u044c \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u044b \u043b\u0438\u0442\u0435\u0440\u0430\u0442\u0443\u0440\u043d\u044b\u0435 \u0434\u0443\u044d\u043b\u0438. <\/p>\n<p>  \u0423\u0441\u0442\u0440\u043e\u0438\u043c \u043b\u0438\u0442\u0435\u0440\u0430\u0442\u0443\u0440\u043d\u0443\u044e \u0434\u0443\u044d\u043b\u044c \u043c\u0435\u0436\u0434\u0443 \u0434\u0432\u0443\u043c\u044f \u043f\u043e\u044d\u0442\u0430\u043c\u0438. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0441\u0446\u0435\u043d\u0443 <i>src\\main\\java\\spring\\impls\\ Stage.java<\/i><\/p>\n<pre><code class=\"java\">package spring.impls;  import spring.intarfaces.Lyricist;  public class Stage { \tprivate Lyricist lyr1; \tprivate Lyricist lyr2;  \tpublic Stage(Lyricist lyr1, Lyricist lyr2) { \t\tthis.lyr1 = lyr1; \t\tthis.lyr2 = lyr2; \t}  \tpublic void Act() { \t\tSystem.out.println(\"\u041f\u0435\u0440\u0432\u044b\u0439 \u043f\u043e\u044d\u0442:\"); \t\tSystem.out.println(lyr1.Generate());  \t\tSystem.out.println(); \t\tSystem.out.println(\"\u0412\u0442\u043e\u0440\u043e\u0439 \u043f\u043e\u044d\u0442:\"); \t\tSystem.out.println(lyr2.Generate());  \t\tSystem.out.println();  \t\tSystem.out.print(\"\u0412 \u043b\u0438\u0442\u0435\u0440\u0430\u0442\u0443\u0440\u043d\u043e\u0439 \u0434\u0443\u044d\u043b\u0438 \u043f\u043e\u0431\u0435\u0434\u0438\u043b \"); \t\tif (Math.random() &lt; 0.1) { \t\t\tSystem.out.println(\"\u041f\u0435\u0440\u0432\u044b\u0439 \u043f\u043e\u044d\u0442.\"); \t\t} else { \t\t\tSystem.out.println(\"\u0412\u0442\u043e\u0440\u043e\u0439 \u043f\u043e\u044d\u0442.\"); \t\t} \t} } <\/code><\/pre>\n<p>  \u0412 \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u0435, \u043c\u043e\u0436\u043d\u043e \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c <i>src\\main\\java\\spring\\main\\ Start.java<\/i> \u2013 \u0438 \u0432\u0441\u0435 \u0437\u0430\u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442:<\/p>\n<pre><code class=\"java\">package spring.main;  import org.springframework.context.ApplicationContext; import org.springframework.context.ConfigurableApplicationContext; import org.springframework.context.support.ClassPathXmlApplicationContext;  import spring.impls.Stage; import spring.intarfaces.Lyricist;  public class Start {  \tpublic static void main(String[] args) { \t\tApplicationContext context = new ClassPathXmlApplicationContext(\"ApplicationContext.xml\"); \t\tLyricist lyr1 = context.getBean(\"LyricistBean2\", Lyricist.class);  \t\tLyricist lyr2 = context.getBean(\"LyricistBean3\", Lyricist.class);  \t\tStage myStage = new Stage(lyr1, lyr2); \t\tmyStage.Act();  \t\t((ConfigurableApplicationContext) context).close();\/\/ \u0437\u0430\u043a\u0440\u044b\u0442\u0438\u0435 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0430   \t}  } <\/code><\/pre>\n<p>  \u0417\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u2013 \u0432\u0441\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442. \u041f\u043e\u044d\u0442\u044b \u0432\u044b\u0434\u0430\u043b\u0438 \u043f\u043e \u043e\u0434\u043d\u043e\u043c\u0443 \u0448\u0435\u0434\u0435\u0432\u0440\u0443, \u0432\u0442\u043e\u0440\u043e\u0439, \u0441\u043a\u043e\u0440\u0435\u0435 \u0432\u0441\u0435\u0433\u043e, \u043f\u043e\u0431\u0435\u0434\u0438\u043b. \u0422\u0430\u043a \u0438 \u0434\u043e\u043b\u0436\u043d\u043e \u0431\u044b\u0442\u044c, 27 \u0444\u0435\u0432\u0440\u0430\u043b\u044f 1918 \u0433\u043e\u0434\u0430 \u0432 \u041f\u043e\u043b\u0438\u0442\u0435\u0445\u043d\u0438\u0447\u0435\u0441\u043a\u043e\u043c \u043c\u0443\u0437\u0435\u0435 \u043d\u0430 \u0418\u0437\u0431\u0440\u0430\u043d\u0438\u0438 \u043a\u043e\u0440\u043e\u043b\u044f \u043f\u043e\u044d\u0442\u043e\u0432 \u0421\u0435\u0432\u0435\u0440\u044f\u043d\u0438\u043d \u043f\u043e\u0431\u0435\u0434\u0438\u043b \u041c\u0430\u044f\u043a\u043e\u0432\u0441\u043a\u043e\u0433\u043e. \u041d\u043e \u043c\u044b \u0434\u0430\u043b\u0438 \u0412\u043b\u0430\u0434\u0438\u043c\u0438\u0440\u0443 \u0412\u043b\u0430\u0434\u0438\u043c\u0438\u0440\u043e\u0432\u0438\u0447\u0443 \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u0448\u0430\u043d\u0441. \u041c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c, \u0432 \u0432\u0430\u0448\u0435\u0439 \u0432\u0435\u0440\u0441\u0438\u0438 \u043f\u043e\u0431\u0435\u0434\u0438\u043b \u043e\u043d.<\/p>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u0432\u044b\u043d\u0435\u0441\u0435\u043c \u0432\u0441\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u0432 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0439 \u0444\u0430\u0439\u043b <i>src\\main\\resources\\ApplicationContext.xml<\/i>, \u043d\u0435\u0433\u043e\u0436\u0435 \u044f\u0432\u043d\u043e \u0432 \u0441\u0442\u0430\u0440\u0442\u043e\u0432\u043e\u043c \u0444\u0430\u0439\u043b\u0435 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0431\u0438\u043d\u044b.<\/p>\n<pre><code class=\"xml\">&lt;?xml version=\"1.0\" encoding=\"UTF-8\"?&gt; &lt;beans xmlns=\"http:\/\/www.springframework.org\/schema\/beans\" \txmlns:xsi=\"http:\/\/www.w3.org\/2001\/XMLSchema-instance\" \txsi:schemaLocation=\"http:\/\/www.springframework.org\/schema\/beans http:\/\/www.springframework.org\/schema\/beans\/spring-beans.xsd\"&gt;  \t&lt;bean id=\"LyricistBean1\" class=\"spring.impls.Poushkin\"\/&gt; \t&lt;bean id=\"LyricistBean2\" class=\"spring.impls.Mayakovsky\"\/&gt; \t&lt;bean id=\"LyricistBean3\" class=\"spring.impls.Severyanin\"\/&gt;  \t&lt;bean id=\"StageBean\" class=\"spring.impls.Stage\"&gt; \t\t&lt;constructor-arg ref=\"LyricistBean2\" \/&gt; \t\t&lt;constructor-arg ref=\"LyricistBean3\" \/&gt; \t&lt;\/bean&gt; \t &lt;\/beans&gt; <\/code><\/pre>\n<p>  \u041e\u0431\u044b\u0447\u043d\u043e \u0431\u0438\u043d\u044b \u0441\u043e\u0437\u0434\u0430\u044e\u0442\u0441\u044f \u0441 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440\u043e\u043c \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u0431\u0435\u0437 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u043e\u0432. \u041d\u043e \u0432 \u043d\u0430\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043e\u043d \u043d\u0435 \u043f\u043e\u0434\u043e\u0439\u0434\u0435\u0442. \u041f\u0435\u0440\u0435\u0434\u0430\u0434\u0438\u043c \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u0441\u0441\u044b\u043b\u043a\u0438 \u043d\u0430 \u0434\u0440\u0443\u0433\u0438\u0435 \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0435\u043c\u044b\u0435 \u0431\u0438\u043d\u044b \u041c\u0430\u044f\u043a\u043e\u0432\u0441\u043a\u043e\u0433\u043e \u0438 \u0421\u0435\u0432\u0435\u0440\u044f\u043d\u0438\u043d\u0430.<\/p>\n<p>  \u041e\u0441\u0442\u0430\u043b\u043e\u0441\u044c \u0443\u0431\u0440\u0430\u0442\u044c \u0432\u0441\u0435 \u043b\u0438\u0448\u043d\u0435\u0435 \u0438\u0437 \u043a\u043b\u0430\u0441\u0441\u0430 <i>src\\main\\java\\spring\\main\\ Start.java<\/i> <\/p>\n<pre><code class=\"java\">package spring.main;  import org.springframework.context.ApplicationContext; import org.springframework.context.ConfigurableApplicationContext; import org.springframework.context.support.ClassPathXmlApplicationContext;  import spring.impls.Stage;  public class Start {  \tpublic static void main(String[] args) { \t\tApplicationContext context = new ClassPathXmlApplicationContext(\"ApplicationContext.xml\");  \t\tStage myStage = context.getBean(\"StageBean\", Stage.class); \t\tmyStage.Act();  \t\t((ConfigurableApplicationContext) context).close();\/\/ \u0437\u0430\u043a\u0440\u044b\u0442\u0438\u0435 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0430  \t}  } <\/code><\/pre>\n<p>  \u0417\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c. \u0412\u0441\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442. \u0411\u0438\u043d\u044b \u0441\u043e\u0437\u0434\u0430\u044e\u0442\u0441\u044f. \u0421\u0435\u0432\u0435\u0440\u044f\u043d\u0438\u043d \u0432\u043d\u043e\u0432\u044c \u043f\u043e\u0431\u0435\u0434\u0438\u043b.<\/p>\n<p>  \u0412\u043e \u0432\u0441\u044f\u043a\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435, \u0432 \u043c\u043e\u0435\u0439 \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u0438.<\/p>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c, \u043a\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u043c\u043e\u0436\u043d\u043e \u0441\u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u0435\u0442\u0442\u0435\u0440\u044b.<\/p>\n<h3>\u0423\u0440\u043e\u043a 07. \u0412\u043d\u0435\u0434\u0440\u0435\u043d\u0438\u0435 \u0447\u0435\u0440\u0435\u0437 \u0441\u0435\u0442\u0442\u0435\u0440\u044b.<\/h3>\n<p>  \u041f\u0440\u043e\u0434\u043e\u043b\u0436\u0438\u043c \u0442\u0435\u0440\u0437\u0430\u0442\u044c \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0438\u0439 \u043f\u0440\u043e\u0435\u043a\u0442.<br \/>  \u041d\u0430\u0432\u0435\u0440\u043d\u043e\u0435, \u043d\u0435\u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e \u043f\u0440\u0438 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0438 \u0441\u0446\u0435\u043d\u044b \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u0438 \u043f\u043e\u044d\u0442\u043e\u0432.<br \/>  \u0418\u0441\u043f\u0440\u0430\u0432\u0438\u043c \u044d\u0442\u0443 \u043e\u043f\u043b\u043e\u0448\u043d\u043e\u0441\u0442\u044c \u0438 \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u0438\u0437\u043c\u0435\u043d\u0438\u043c \u043a\u043b\u0430\u0441\u0441 \u0441\u0446\u0435\u043d\u044b. \u0423\u0434\u0430\u043b\u0438\u043c \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440 \u0438 \u0434\u043e\u0431\u0430\u0432\u0438\u043c \u0441\u0435\u0442\u0442\u0435\u0440\u044b \u0434\u043b\u044f lyr1 \u0438 lyr2 \u0438\u0437 <i>src\\main\\java\\spring\\impls\\ Stage.java<\/i><\/p>\n<pre><code class=\"java\">package spring.impls;  import spring.intarfaces.Lyricist;  public class Stage { \tprivate Lyricist lyr1; \tprivate Lyricist lyr2;  \tpublic void setLyr1(Lyricist lyr1) { \t\tthis.lyr1 = lyr1; \t}  \tpublic void setLyr2(Lyricist lyr2) { \t\tthis.lyr2 = lyr2; \t}  \tpublic void Act() { \t\tSystem.out.println(\"\u041f\u0435\u0440\u0432\u044b\u0439 \u043f\u043e\u044d\u0442:\"); \t\tSystem.out.println(lyr1.Generate());  \t\tSystem.out.println(); \t\tSystem.out.println(\"\u0412\u0442\u043e\u0440\u043e\u0439 \u043f\u043e\u044d\u0442:\"); \t\tSystem.out.println(lyr2.Generate());  \t\tSystem.out.println();  \t\tSystem.out.print(\"\u0412 \u043b\u0438\u0442\u0435\u0440\u0430\u0442\u0443\u0440\u043d\u043e\u0439 \u0434\u0443\u044d\u043b\u0438 \u043f\u043e\u0431\u0435\u0434\u0438\u043b \"); \t\tif (Math.random() &lt; 0.1) { \t\t\tSystem.out.println(\"\u041f\u0435\u0440\u0432\u044b\u0439 \u043f\u043e\u044d\u0442.\"); \t\t} else { \t\t\tSystem.out.println(\"\u0412\u0442\u043e\u0440\u043e\u0439 \u043f\u043e\u044d\u0442.\"); \t\t} \t} } <\/code><\/pre>\n<p>  \u0418\u0437\u043c\u0435\u043d\u0438\u043c \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0439 \u0444\u0430\u0439\u043b <i>src\\main\\resources\\ApplicationContext.xml<\/i>. \u0423\u0431\u0435\u0440\u0435\u043c \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u044b \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440\u0430 \u0438 \u0434\u043e\u0431\u0430\u0432\u0438\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0441\u0435\u0442\u0442\u0435\u0440\u043e\u0432.<\/p>\n<pre><code class=\"xml\">&lt;?xml version=\"1.0\" encoding=\"UTF-8\"?&gt; &lt;beans xmlns=\"http:\/\/www.springframework.org\/schema\/beans\" \txmlns:xsi=\"http:\/\/www.w3.org\/2001\/XMLSchema-instance\" \txsi:schemaLocation=\"http:\/\/www.springframework.org\/schema\/beans http:\/\/www.springframework.org\/schema\/beans\/spring-beans.xsd\"&gt;  \t&lt;bean id=\"LyricistBean1\" class=\"spring.impls.Poushkin\"\/&gt; \t&lt;bean id=\"LyricistBean2\" class=\"spring.impls.Mayakovsky\"\/&gt; \t&lt;bean id=\"LyricistBean3\" class=\"spring.impls.Severyanin\"\/&gt;  \t&lt;bean id=\"StageBean\" class=\"spring.impls.Stage\"&gt; \t\t&lt;property name=\"lyr1\" ref=\"LyricistBean2\"&gt;&lt;\/property&gt; \t\t&lt;property name=\"lyr2\" ref=\"LyricistBean3\"&gt;&lt;\/property&gt; \t&lt;\/bean&gt; &lt;\/beans&gt; <\/code><\/pre>\n<p>  \u041a\u043b\u0430\u0441\u0441 \u0441\u0442\u0430\u0440\u0442 \u0432 \u0434\u0430\u043d\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043c\u043e\u0436\u043d\u043e \u043d\u0435 \u0442\u0440\u043e\u0433\u0430\u0442\u044c. \u0417\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c. \u0412\u0441\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442. \u041e\u0442\u043c\u0435\u0442\u0438\u043c, \u0447\u0442\u043e \u0434\u043b\u044f \u0441\u0446\u0435\u043d\u044b \u043d\u0435 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442\u0441\u044f \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440 \u0441 \u0434\u0432\u0443\u043c\u044f \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430\u043c\u0438, \u0437\u0430\u0442\u043e \u043f\u043e\u0441\u043b\u0435 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0441\u0446\u0435\u043d\u044b \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u044e\u0442\u0441\u044f \u0434\u0432\u0430 \u0441\u0435\u0442\u0442\u0435\u0440\u0430.<\/p>\n<p>  \u041f\u0440\u043e\u0434\u043e\u043b\u0436\u0435\u043d\u0438\u0435 \u0441\u043b\u0435\u0434\u0443\u0435\u0442\u2026<\/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\/421093\/\"> https:\/\/habr.com\/post\/421093\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"\n<div data-io-article-url=\"https:\/\/habr.com\/post\/421093\/\" class=\"post__text post__text-html js-mediator-article\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/vi\/74\/jo\/vi74joda-budmboowhis1myktou.jpeg\"><\/p>\n<p>  \u0414\u043e\u0431\u0440\u044b\u0439 \u0434\u0435\u043d\u044c!<\/p>\n<p>  \u042f \u0432\u0434\u043e\u0445\u043d\u043e\u0432\u0438\u043b\u0441\u044f \u043f\u0440\u0438\u0433\u043b\u0430\u0448\u0435\u043d\u0438\u0435\u043c \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0438\u0442\u044c <a href=\"https:\/\/habr.com\/post\/420901\">\u043f\u0443\u0431\u043b\u0438\u043a\u0430\u0446\u0438\u044e, <\/a> \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0430\u044e.<\/p>\n<p>  \u0412 \u044d\u0442\u043e\u0442 \u0440\u0430\u0437 \u043c\u044b \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u0435 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u044b \u0432\u043d\u0435\u0434\u0440\u0435\u043d\u0438\u044f \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u2014 \u0447\u0435\u0440\u0435\u0437 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440 \u0438 \u0447\u0435\u0440\u0435\u0437 \u0441\u0435\u0442\u0442\u0435\u0440\u044b. \u0412\u0441\u0435 \u0438\u0441\u0445\u043e\u0434\u043d\u0438\u043a\u0438 \u0438\u0441\u043a\u0430\u0442\u044c <a href=\"https:\/\/github.com\/KevinSmish\/JavaSpring\">\u0437\u0434\u0435\u0441\u044c<\/a>  <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-288434","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/288434","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=288434"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/288434\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=288434"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=288434"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=288434"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}