【问题标题】:using spring social with struts2使用带有struts2的spring social
【发布时间】:2013-11-02 17:02:43
【问题描述】:

我正在尝试在我的 java web 应用程序中使用 spring-social 从这里http://projects.spring.io/spring-social/

但是我将 struts2 用于 MVC 而不是 spring mvc 所以任何人都可以 请告诉如何在struts2中使用spring social

【问题讨论】:

  • 您找到解决方案了吗?我也有同样的问题!
  • 我也有同样的问题? @user2894360 如果您找到任何解决方案,请在回答中发布谢谢。

标签: facebook struts2 spring-social


【解决方案1】:

使用它的最佳方式是创建一个 maven 项目。 spring social 本身依赖于 spring 框架。只是你使用的是 Struts mvc 而不是 spring mvc,你将在动作类中编写代码。所以最好使用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

2.> http://www.petrikainulainen.net/spring-social-tutorial/

【讨论】:

  • 他正在使用 Struts2,因此无法轻松访问春季社交课程。
猜你喜欢
  • 2015-04-30
  • 1970-01-01
  • 2016-01-23
  • 2013-03-01
  • 1970-01-01
  • 2014-03-01
  • 1970-01-01
  • 1970-01-01
  • 2013-10-01
相关资源
最近更新 更多