{"id":272326,"date":"2016-01-18T11:12:02","date_gmt":"2016-01-18T08:12:02","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=272326"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=272326","title":{"rendered":"\u041f\u0438\u0448\u0435\u043c \u0441\u0432\u043e\u0439 spring-boot-starter"},"content":{"rendered":"<p>       \u0411\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u043e java-\u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u043e\u0432 \u0443\u0436\u0435 \u043f\u043e\u0437\u043d\u0430\u043a\u043e\u043c\u0438\u043b\u0438\u0441\u044c \u0441 \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u043c <a href=\"http:\/\/projects.spring.io\/spring-boot\/\">Spring Boot<\/a>, \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0449\u0438\u043c \u0431\u044b\u0441\u0442\u0440\u043e \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0449\u0435\u0435 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0435 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b Spring Framework (Spring MVC, Spring Data \u0438 \u043c\u043d\u043e\u0433\u0438\u0435 \u0434\u0440\u0443\u0433\u0438\u0435).<\/p>\n<p>  \u0412\u0441\u0451 \u0443\u0434\u043e\u0431\u0441\u0442\u0432\u043e <b>Spring Boot<\/b> \u043e\u0441\u043d\u043e\u0432\u0430\u043d\u043e \u043d\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438 \u0442\u0430\u043a \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u043c\u044b\u0445 <i>Starter<\/i>, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0442 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043d\u0430\u0431\u043e\u0440 \u0441\u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u0431\u0438\u043d\u043e\u0432, \u0433\u043e\u0442\u043e\u0432\u044b\u0445 \u043a \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044e \u0438 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u0445 \u0434\u043b\u044f \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \u0447\u0435\u0440\u0435\u0437 properties-\u0444\u0430\u0439\u043b\u044b. \u041d\u043e \u0447\u0442\u043e \u0434\u0435\u043b\u0430\u0442\u044c, \u0435\u0441\u043b\u0438 \u0434\u043b\u044f \u043d\u0443\u0436\u043d\u043e\u0439 \u0442\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438\u0438 \u0435\u0449\u0435 \u043d\u0435 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043e \u0441\u0442\u0430\u0440\u0442\u0435\u0440\u0430?<br \/>  <a name=\"habracut\"><\/a><br \/>  \u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u043c\u043d\u0435 \u0431\u044b \u0445\u043e\u0442\u0435\u043b\u043e\u0441\u044c \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u0430\u0442\u044c \u043e \u0442\u043e\u043c, \u043a\u0430\u043a \u0441\u043e\u0437\u0434\u0430\u044e\u0442\u0441\u044f \u0441\u0442\u0430\u0440\u0442\u0435\u0440\u044b \u043d\u0430 \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u0441\u0442\u0430\u0440\u0442\u0435\u0440\u0430 \u0434\u043b\u044f Spring-social-vkontakte. Spring Social \u044d\u0442\u043e \u043e\u0434\u0438\u043d \u0438\u0437 \u043c\u043e\u0434\u0443\u043b\u0435\u0439 <b>Spring Framework<\/b>, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0439 \u0434\u043b\u044f \u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u0438 \u0441 \u0441\u043e\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u043c\u0438 \u0441\u0435\u0442\u044f\u043c\u0438. \u0412 \u043f\u0440\u043e\u0435\u043a\u0442 Spring Boot \u0432\u043a\u043b\u044e\u0447\u0435\u043d\u044b \u0441\u0442\u0430\u0440\u0442\u0435\u0440\u044b \u0434\u043b\u044f \u0442\u0430\u043a\u0438\u0445 \u0441\u043e\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0445 \u0441\u0435\u0442\u0435\u0439 \u043a\u0430\u043a <i>Facebook<\/i> (spring-boot-starter-social-facebook), Twitter (spring-boot-starter-social-twitter) \u0438 LinkedIn (spring-boot-starter-social-twitter), \u043e\u0441\u043d\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u043d\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0445 Social-\u043c\u043e\u0434\u0443\u043b\u0435\u0439. \u0411\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u043e \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u043e\u0432 \u0438\u0437 \u0421\u041d\u0413 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u0443\u0435\u0442 \u0432 \u043f\u0435\u0440\u0432\u0443\u044e \u043e\u0447\u0435\u0440\u0435\u0434\u044c \u0441\u043e\u0446\u0438\u0430\u043b\u044c\u043d\u0430\u044f \u0441\u0435\u0442\u044c \u0412\u043a\u043e\u043d\u0442\u0430\u043a\u0442\u0435, \u0434\u043b\u044f \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u0441\u0442\u043e\u0440\u043e\u043d\u043d\u0438\u0439 \u043c\u043e\u0434\u0443\u043b\u044c <b>spring-social-vkontakte<\/b>. \u0421\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u0441\u0442\u0430\u0440\u0442\u0435\u0440\u0430 \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043c\u043e\u0434\u0443\u043b\u044f \u0435\u0449\u0435 \u043d\u0435\u0442. \u041d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u0435\u043c \u044d\u0442\u043e\u0433\u043e \u0441\u0442\u0430\u0440\u0442\u0435\u0440\u0430 \u043c\u044b \u0438 \u0437\u0430\u0439\u043c\u0435\u043c\u0441\u044f \u0432 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435.<\/p>\n<p>  \u041a\u0440\u0430\u0435\u0443\u0433\u043e\u043b\u044c\u043d\u044b\u043c \u043a\u0430\u043c\u043d\u0435\u043c \u0438\u043d\u0444\u0440\u0430\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b <b>Spring Boot<\/b> \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f <i>AutoConfiguration-\u043a\u043b\u0430\u0441\u0441\u044b<\/i>, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 <b>Spring Boot<\/b> \u043d\u0430\u0445\u043e\u0434\u0438\u0442 \u043f\u0440\u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u0434\u043b\u044f \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0438 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0431\u0438\u043d\u043e\u0432.<\/p>\n<p>  \u0421\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0442\u0430\u043a\u043e\u0439 \u043a\u043b\u0430\u0441\u0441 \u0434\u043b\u044f \u043d\u0430\u0448\u0435\u0433\u043e \u0441\u0442\u0430\u0440\u0442\u0435\u0440\u0430:<\/p>\n<pre><code class=\"java\">@Configuration @ConditionalOnClass({SocialConfigurerAdapter.class, VKontakteConnectionFactory.class}) @ConditionalOnProperty(prefix= &quot;ru.shadam.social-vkontakte&quot;, name = { &quot;client-id&quot;, &quot;client-secret&quot;}) @AutoConfigureBefore(SocialWebAutoConfiguration.class) @AutoConfigureAfter(WebMvcAutoConfiguration.class) public class VKontakteAutoConfiguration { } <\/code><\/pre>\n<p>  \u041c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u0430\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u0438, \u0447\u0442\u043e\u0431\u044b \u0443\u043a\u0430\u0437\u0430\u0442\u044c SpringBoot, \u0447\u0442\u043e \u043d\u0430\u0448 \u043a\u043b\u0430\u0441\u0441 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0435\u0439 (@Configuration), \u0430\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u0438, \u0447\u0442\u043e\u0431\u044b \u0437\u0430\u0434\u0430\u0442\u044c \u0443\u0441\u043b\u043e\u0432\u0438\u044f, \u043f\u0440\u0438 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043d\u0430\u0448 AutoConfiguration \u0431\u0443\u0434\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0431\u0438\u043d\u043e\u0432, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0430\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u0438, \u0447\u0442\u043e\u0431\u044b \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u043a\u0430\u043a\u043e\u0432\u043e \u043c\u0435\u0441\u0442\u043e \u043d\u0430\u0448\u0435\u0439 \u0430\u0432\u0442\u043e\u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \u0432 \u043f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u0435 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f.<\/p>\n<p>  \u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c:<\/p>\n<pre><code class=\"java\">@ConditionalOnClass({SocialConfigurerAdapter.class, VKontakteConnectionFactory.class}) <\/code><\/pre>\n<p>  \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442, \u0447\u0442\u043e \u0431\u0438\u043d\u044b \u0431\u0443\u0434\u0443\u0442 \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c\u0441\u044f \u043f\u0440\u0438 \u043d\u0430\u043b\u0438\u0447\u0438\u0438 \u0432 classpath SocialConfigurerAdapter(\u0432\u0445\u043e\u0434\u0438\u0442 \u0432 \u043c\u043e\u0434\u0443\u043b\u044c Spring-Social) \u0438 VKontakteConnectionFactory (\u0432\u0445\u043e\u0434\u0438\u0442 \u0432 \u043c\u043e\u0434\u0443\u043b\u044c Spring-Social-Vkontakte). \u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u0431\u0435\u0437 \u043d\u0443\u0436\u043d\u044b\u0445 \u0434\u043b\u044f \u043d\u0430\u0448\u0435\u0433\u043e \u0441\u0442\u0430\u0440\u0442\u0435\u0440\u0430 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0435\u0439 \u0431\u0438\u043d\u044b \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c\u0441\u044f \u043d\u0435 \u0431\u0443\u0434\u0443\u0442. <\/p>\n<pre><code class=\"java\">@ConditionalOnProperty(prefix= &quot;ru.shadam.social-vkontakte&quot;, name = { &quot;client-id&quot;, &quot;client-secret&quot;}) <\/code><\/pre>\n<p>  \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442, \u0447\u0442\u043e \u0431\u0438\u043d\u044b \u0431\u0443\u0434\u0443\u0442 \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u0440\u0438 \u043d\u0430\u043b\u0438\u0447\u0438\u0438 property ru.shadam.social-vkontakte.client-id \u0438 ru.shadam.social-vkontakte.client-secret.<\/p>\n<pre><code class=\"java\">@AutoConfigureBefore(SocialWebAutoConfiguration.class) @AutoConfigureAfter(WebMvcAutoConfiguration.class) <\/code><\/pre>\n<p>  \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442, \u0447\u0442\u043e \u043d\u0430\u0448 \u0431\u0438\u043d \u0431\u0443\u0434\u0435\u0442 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u043f\u043e\u0441\u043b\u0435 WebMvc \u0438 \u0434\u043e SocialWeb. \u042d\u0442\u043e \u043d\u0443\u0436\u043d\u043e, \u0447\u0442\u043e\u0431\u044b \u043a \u043c\u043e\u043c\u0435\u043d\u0442\u0443 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 SocialWeb \u043d\u0430\u0448\u0438 \u0431\u0438\u043d\u044b \u0443\u0436\u0435 \u0431\u044b\u043b\u0438 \u0437\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u044b.<\/p>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u043f\u0435\u0440\u0435\u0439\u0434\u0435\u043c \u043a \u0442\u043e\u043c\u0443, \u043a\u0430\u043a\u0438\u0435 \u0431\u0438\u043d\u044b \u043c\u044b \u0441\u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0438\u0440\u0443\u0435\u043c \u0432 \u043d\u0430\u0448\u0435\u043c AutoConfiguration.<\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">VKontakteAutoConfiguration.java<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"java\">@Configuration @ConditionalOnClass({SocialConfigurerAdapter.class, VKontakteConnectionFactory.class}) @ConditionalOnProperty(prefix= &quot;ru.shadam.social-vkontakte&quot;, name = { &quot;client-id&quot;, &quot;client-secret&quot;}) @AutoConfigureBefore(SocialWebAutoConfiguration.class) @AutoConfigureAfter(WebMvcAutoConfiguration.class) public class VKontakteAutoConfiguration {      @Configuration     @EnableSocial     @EnableConfigurationProperties(VKontakteProperties.class)     @ConditionalOnWebApplication     protected static class VKontakteConfigurationAdapter extends SocialConfigurerAdapter {          @Autowired         private VKontakteProperties properties;          @Bean         @ConditionalOnMissingBean         @Scope(value = &quot;request&quot;, proxyMode = ScopedProxyMode.INTERFACES)         public VKontakte vkontakte(ConnectionRepository repository) {             Connection&lt;VKontakte&gt; connection = repository.findPrimaryConnection(VKontakte.class);             if (connection != null) {                 return connection.getApi();             }             return new VKontakteTemplate(this.properties.getClientId(), this.properties.getClientSecret());         }          private ConnectionFactory&lt;?&gt; createConnectionFactory() {             return new VKontakteConnectionFactory(this.properties.getClientId(), this.properties.getClientSecret());         }          @Override         public void addConnectionFactories(ConnectionFactoryConfigurer connectionFactoryConfigurer, Environment environment) {             connectionFactoryConfigurer.addConnectionFactory(createConnectionFactory());         }     } } <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  \u0420\u0430\u0441\u0448\u0438\u0440\u044f\u0435\u043c <b>SocialConfigurationAdapter<\/b>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043d\u0443\u0436\u0435\u043d \u0434\u043b\u044f \u0442\u043e\u0433\u043e \u0447\u0442\u043e\u0431\u044b \u0437\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043d\u0430\u0448\u0443 <b>ConnectionFactory<\/b>. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0432 SocialConfigurerAdapter \u0435\u0441\u0442\u044c callback-\u043c\u0435\u0442\u043e\u0434:<\/p>\n<pre><code class=\"java\">addConnectionFactories(ConnectionFactoryConfigurer, Environment)<\/code><\/pre>\n<p>  \u0415\u0433\u043e \u043c\u044b \u0438 \u043f\u0435\u0440\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u043c, \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u044f \u043d\u0430\u0448\u0443 ConnectionFactory.<\/p>\n<p>  \u0422\u0430\u043a\u0436\u0435 \u0437\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u0443\u0435\u043c request-scoped \u0431\u0438\u043d <b>Vkontakte<\/b>, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0441\u043e\u0431\u043e\u0439 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 \u0434\u043b\u044f \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043a API \u0412\u043a\u043e\u043d\u0442\u0430\u043a\u0442\u0435. \u041f\u0440\u0438 \u044d\u0442\u043e\u043c, \u0435\u0441\u043b\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0443\u0435\u0442\u0441\u044f \u0447\u0435\u0440\u0435\u0437 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435, \u0442\u043e \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u0441 API \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u043e \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c auth_token.<\/p>\n<p>  \u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0442\u0430\u043a\u0436\u0435 \u043a\u043b\u0430\u0441\u0441 VkontakteProperties, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \u0438\u0437 properties-\u0444\u0430\u0439\u043b\u043e\u0432 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f<\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">VkontakteProperties.java<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"java\">@ConfigurationProperties(prefix = &quot;ru.shadam.social-vkontakte&quot;) public class VKontakteProperties  {     private String clientId;     private String clientSecret;      public String getClientId() {         return clientId;     }      public void setClientId(String clientId) {         this.clientId = clientId;     }      public String getClientSecret() {         return clientSecret;     }      public void setClientSecret(String clientSecret) {         this.clientSecret = clientSecret;     } } <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  \u0417\u0430 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u0438\u0437 properties \u0444\u0430\u0439\u043b\u043e\u0432 \u043e\u0442\u0432\u0435\u0447\u0430\u0435\u0442 \u0430\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u044f:<\/p>\n<pre><code class=\"java\">@ConfigurationProperties(prefix = &quot;ru.shadam.social-vkontakte&quot;) <\/code><\/pre>\n<p>  \u041e\u043d\u0430 \u0441\u043e\u043e\u0431\u0449\u0430\u0435\u0442 SpringBoot, \u0447\u0442\u043e \u043d\u0443\u0436\u043d\u043e \u043f\u043e\u043f\u044b\u0442\u0430\u0442\u044c\u0441\u044f \u0432\u0441\u0435 \u043f\u0440\u043e\u043f\u0435\u0440\u0442\u0438, \u043d\u0430\u0447\u0438\u043d\u0430\u044e\u0449\u0438\u0435\u0441\u044f \u0441 \u043f\u0440\u0435\u0444\u0438\u043a\u0441\u0430 <b>ru.shadam.social-vkontakte<\/b> \u043f\u043e\u043c\u0435\u0441\u0442\u0438\u0442\u044c \u0432 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0435 \u043f\u043e\u043b\u044f \u043a\u043b\u0430\u0441\u0441\u0430.<\/p>\n<p>  \u041f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u043c \u043d\u0430\u0448\u0438\u043c \u0448\u0430\u0433\u043e\u043c \u0431\u0443\u0434\u0435\u0442 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0444\u0430\u0439\u043b\u0430, \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0449\u0435\u0433\u043e SpringBoot \u043d\u0430\u0439\u0442\u0438 \u043d\u0430\u0448 AutoConfiguration \u043a\u043b\u0430\u0441\u0441. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0439 \u0444\u0430\u0439\u043b spring.factories, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043d\u0443\u0436\u043d\u043e \u043f\u043e\u043c\u0435\u0441\u0442\u0438\u0442\u044c \u0432 META-INF \u043f\u0430\u043f\u043a\u0443 \u043f\u043e\u043b\u0443\u0447\u0430\u044e\u0449\u0435\u0433\u043e\u0441\u044f jar-\u0444\u0430\u0439\u043b\u0430.<\/p>\n<p>  \u0412 \u044d\u0442\u043e\u043c \u0444\u0430\u0439\u043b\u0435 \u043d\u0430\u043c \u043d\u0430\u0434\u043e \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u043d\u0430\u0448 AutoConfiguration-\u043a\u043b\u0430\u0441\u0441.<\/p>\n<pre><code class=\"java\">org.springframework.boot.autoconfigure.EnableAutoConfiguration=ru.shadam.spring.boot.vkontakte.VKontakteAutoConfiguration <\/code><\/pre>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c, \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u0432 \u043f\u043e\u043b\u0443\u0447\u0438\u0432\u0448\u0438\u0439\u0441\u044f jar \u043a \u043d\u0430\u0448\u0435\u043c\u0443 <b>Spring Boot<\/b> \u043f\u0440\u043e\u0435\u043a\u0442\u0443 \u0438 \u0437\u0430\u0434\u0430\u0432 \u0432 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 ru.shadam.social-vkontakte.client-id \u0438 ru.shadam.social-vkontakte.client-secret, \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u043c \u0432 \u043d\u0430\u0448\u0435\u043c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0438 \u0441\u043a\u043e\u043d\u0444\u0438\u0433\u0440\u0443\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u043f\u0443\u0442\u0438 \/connect\/vkontakte \u0438 \u0431\u0438\u043d Vkontakte, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0434\u043b\u044f \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043a API \u0412\u043a\u043e\u043d\u0442\u0430\u043a\u0442\u0435.<\/p>\n<p>  \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u043c\u0430\u0442\u0435\u0440\u0438\u0430\u043b\u044b:<\/p>\n<ol>\n<li><a href=\"https:\/\/docs.spring.io\/spring-boot\/docs\/current\/reference\/html\/boot-features-developing-auto-configuration.html\">docs.spring.io\/spring-boot\/docs\/current\/reference\/html\/boot-features-developing-auto-configuration.html<\/a>  <\/li>\n<li>\u0421\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043f\u0440\u043e\u0435\u043a\u0442 \u043d\u0430 github: <a href=\"https:\/\/github.com\/saladinkzn\/social-vkontakte-spring-boot-starter\">github.com\/saladinkzn\/social-vkontakte-spring-boot-starter<\/a>  <\/li>\n<\/ol>\n<div class=\"clear\"><\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"http:\/\/habrahabr.ru\/post\/275337\/\"> http:\/\/habrahabr.ru\/post\/275337\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>       \u0411\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u043e java-\u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u043e\u0432 \u0443\u0436\u0435 \u043f\u043e\u0437\u043d\u0430\u043a\u043e\u043c\u0438\u043b\u0438\u0441\u044c \u0441 \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u043c <a href=\"http:\/\/projects.spring.io\/spring-boot\/\">Spring Boot<\/a>, \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0449\u0438\u043c \u0431\u044b\u0441\u0442\u0440\u043e \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0449\u0435\u0435 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0435 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b Spring Framework (Spring MVC, Spring Data \u0438 \u043c\u043d\u043e\u0433\u0438\u0435 \u0434\u0440\u0443\u0433\u0438\u0435).<\/p>\n<p>  \u0412\u0441\u0451 \u0443\u0434\u043e\u0431\u0441\u0442\u0432\u043e <b>Spring Boot<\/b> \u043e\u0441\u043d\u043e\u0432\u0430\u043d\u043e \u043d\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438 \u0442\u0430\u043a \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u043c\u044b\u0445 <i>Starter<\/i>, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0442 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043d\u0430\u0431\u043e\u0440 \u0441\u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u0431\u0438\u043d\u043e\u0432, \u0433\u043e\u0442\u043e\u0432\u044b\u0445 \u043a \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044e \u0438 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u0445 \u0434\u043b\u044f \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \u0447\u0435\u0440\u0435\u0437 properties-\u0444\u0430\u0439\u043b\u044b. \u041d\u043e \u0447\u0442\u043e \u0434\u0435\u043b\u0430\u0442\u044c, \u0435\u0441\u043b\u0438 \u0434\u043b\u044f \u043d\u0443\u0436\u043d\u043e\u0439 \u0442\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438\u0438 \u0435\u0449\u0435 \u043d\u0435 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043e \u0441\u0442\u0430\u0440\u0442\u0435\u0440\u0430?  <\/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-272326","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/272326","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=272326"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/272326\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=272326"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=272326"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=272326"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}