2016-03-24 44 views
0

在常規的spring項目中有任何使用spring-boot-starters的機會?我有配置Spring Social項目的麻煩。我已經配置了很多其他的東西,並且我不想將我的項目移動到Spring Boot,只是爲了一個庫。在常規的Spring項目中使用Spring引導啓動器

<dependency> 
     <groupId>org.springframework.boot</groupId> 
     <artifactId>spring-boot-starter-social-facebook</artifactId> 
    </dependency> 
    <dependency> 
     <groupId>org.springframework.boot</groupId> 
     <artifactId>spring-boot-starter-social-linkedin</artifactId> 
    </dependency> 
    <dependency> 
     <groupId>org.springframework.boot</groupId> 
     <artifactId>spring-boot-starter-social-twitter</artifactId> 
    </dependency> 

有沒有可能在Spring常規項目中使用Spring Boot商品?我對Spring Boot非常困惑,因爲我讀到這個項目有助於快速啓動Spring項目而不需要多少配置,還有其他一些對普通Spring項目的優點?

但我在這個主題中的主要問題是:「如何在常規春季項目中使用spring-boot-starters?」

回答

1

有獨立的項目(我不能把超過2個鏈接,這樣,其他人就可以在評論找到):

http://projects.spring.io/spring-social-facebook/

而且還有一個春天社會快速啓動,這將有助於你開始吧: https://github.com/spring-projects/spring-social-samples/tree/master/spring-social-quickstart

spring-social-starter只有maven依賴項。例如,spring-boot-starter-social-facebook在pom中包含這個。

<dependencies> 
     <dependency> 
      <groupId>org.springframework.boot</groupId> 
      <artifactId>spring-boot-starter</artifactId> 
     </dependency> 
     <dependency> 
      <groupId>org.springframework.boot</groupId> 
      <artifactId>spring-boot-starter-web</artifactId> 
     </dependency> 
     <dependency> 
      <groupId>org.springframework.social</groupId> 
      <artifactId>spring-social-config</artifactId> 
     </dependency> 
     <dependency> 
      <groupId>org.springframework.social</groupId> 
      <artifactId>spring-social-core</artifactId> 
     </dependency> 
     <dependency> 
      <groupId>org.springframework.social</groupId> 
      <artifactId>spring-social-web</artifactId> 
     </dependency> 
     <dependency> 
      <groupId>org.springframework.social</groupId> 
      <artifactId>spring-social-facebook</artifactId> 
     </dependency> 
    </dependencies> 

您可以在不依賴從org.springframework.boot包在你的POM中使用它的無彈簧引導功能添加此。

+1

+兩個項目: http://projects.spring.io/spring-social-linkedin/ http://projects.spring.io/spring-social-twitter/ – LucemFerre

+0

我知道有獨立的春季社交項目,但它需要一些配置相比,春季社會起動器 謝謝你的鏈接到示例配置,我會試試這個:) –

+1

正如我所看到的,spring-social-starter - 它只是一個具有依賴性的pom文件: https://github.com/spring-projects/spring-boot/blob/master/spring-boot-starters/spring-boot-starter-social-facebook/pom.xml 您可以將此依賴項複製到您的項目中將是一樣的。 – LucemFerre

相關問題