我正在尝试在我的 java web 应用程序中使用 spring-social 从这里http://projects.spring.io/spring-social/
但是我在 MVC 中使用 struts2 而不是 spring mvc 所以任何人都可以 请告诉如何使用 spring social with struts2
最佳答案
最好的使用方法是创建一个maven项目。 spring social 本身依赖于 spring 框架。只是你使用的是 Struts mvc 而不是 spring mvc,你将在 Action 类中编写代码。所以最好使用maven通过添加
来获取项目中的所有依赖项<dependency>
<groupId>org.springframework.social</groupId>
<artifactId>spring-social-core</artifactId>
<version>1.0.3.RELEASE</version>
</dependency>
<dependency>
<groupId>org.springframework.social</groupId>
<artifactId>spring-social-facebook</artifactId>
<version>${org.springframework.social-facebook-version}</version>
</dependency>
以及您可以在 here 上找到的其他依赖项 并写入 pom.xml 并开始使用任何在线教程。
例如
1.> http://docs.spring.io/spring-social-facebook/docs/1.0.3.RELEASE/reference/html/connecting.html
关于facebook - 在 struts2 中使用 spring social,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19558305/