有没有机会在常规的spring项目中使用spring-boot-starters?我在配置Spring社交项目上遇到了很大的麻烦。我已经配置了很多其他的东西,我不想仅仅为了一个库而将我的项目转移到Spring Boot。
<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项目中使用spring-boot-starters?”
发布于 2016-03-24 16:01:18
有一个独立的项目(我不能放超过2个链接,所以,你可以在评论中找到其他链接):
http://projects.spring.io/spring-social-facebook/
有一个spring社交快速入门,它将帮助你开始使用它: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中,以便在没有spring-boot功能的情况下使用它。
https://stackoverflow.com/questions/36203953
复制相似问题