当前位置: 首页 > 知识库问答 >
问题:

使用spring 3.0.3向spring social添加多个连接工厂的问题

彭畅
2023-03-14

如果我放置了多个连接工厂,我的spring社交配置会出现以下异常。

 org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'connectionFactoryLocator' defined in ServletContext resource [/WEB-INF/social-config.xml]: Error setting propert
y values; nested exception is org.springframework.beans.PropertyBatchUpdateException; nested PropertyAccessExceptions (1) are:
PropertyAccessException 1: org.springframework.beans.MethodInvocationException: Property 'connectionFactories' threw exception; nested exception is java.lang.NullPointerException
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1353)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1076)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:517)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
        at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:291)
        at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
        at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:288)
        at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:190)
        at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:574)
        at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:895)
        at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:425)
        at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:276)
        at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:197)
        at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:47)
        at org.eclipse.jetty.server.handler.ContextHandler.startContext(ContextHandler.java:641)
        at org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:228)
        at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1181)
        at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:584)
        at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:496)
        at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:55)
        at org.eclipse.jetty.deploy.bindings.StandardStarter.processBinding(StandardStarter.java:36)
        at org.eclipse.jetty.deploy.AppLifeCycle.runBindings(AppLifeCycle.java:180)
        at org.eclipse.jetty.deploy.DeploymentManager.requestAppGoal(DeploymentManager.java:481)
        at org.eclipse.jetty.deploy.DeploymentManager.addApp(DeploymentManager.java:137)
        at org.eclipse.jetty.deploy.providers.ScanningAppProvider.fileAdded(ScanningAppProvider.java:137)
        at org.eclipse.jetty.deploy.providers.ScanningAppProvider$1.fileAdded(ScanningAppProvider.java:50)
        at org.eclipse.jetty.util.Scanner.reportAddition(Scanner.java:470)
        at org.eclipse.jetty.util.Scanner.reportDifferences(Scanner.java:382)
        at org.eclipse.jetty.util.Scanner.scan(Scanner.java:339)
        at org.eclipse.jetty.util.Scanner.start(Scanner.java:275)
        at org.eclipse.jetty.deploy.providers.ScanningAppProvider.doStart(ScanningAppProvider.java:114)
        at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:55)
        at org.eclipse.jetty.deploy.DeploymentManager.startAppProvider(DeploymentManager.java:542)
        at org.eclipse.jetty.deploy.DeploymentManager.doStart(DeploymentManager.java:214)
        at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:55)
        at org.eclipse.jetty.server.Server.doStart(Server.java:226)
        at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:55)
        at org.eclipse.jetty.xml.XmlConfiguration$1.run(XmlConfiguration.java:1061)
        at java.security.AccessController.doPrivileged(Native Method)
        at org.eclipse.jetty.xml.XmlConfiguration.main(XmlConfiguration.java:994)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at org.eclipse.jetty.start.Main.invokeMain(Main.java:477)
        at org.eclipse.jetty.start.Main.start(Main.java:623)
        at org.eclipse.jetty.start.Main.parseCommandLine(Main.java:273)
        at org.eclipse.jetty.start.Main.main(Main.java:81)
Caused by: org.springframework.beans.PropertyBatchUpdateException; nested PropertyAccessExceptions (1) are:
PropertyAccessException 1: org.springframework.beans.MethodInvocationException: Property 'connectionFactories' threw exception; nested exception is java.lang.NullPointerException
        at org.springframework.beans.AbstractPropertyAccessor.setPropertyValues(AbstractPropertyAccessor.java:102)
        at org.springframework.beans.AbstractPropertyAccessor.setPropertyValues(AbstractPropertyAccessor.java:58)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1350)
        ... 47 more
2012-09-25 23:39:19.349:WARN::Failed startup of context o.e.j.w.WebAppContext{/loginapp,file:/C:/Users/Gaurav/AppData/Local/Temp/jetty-0.0.0.0-8081-SpringLoginApp-1.0-SNAPSHOT.war-_loginapp-any-/webap
p/},C:/Users/Gaurav/.m2/repository/com/myLogin/common/SpringLoginApp/1.0-SNAPSHOT/SpringLoginApp-1.0-SNAPSHOT.war
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'connectionFactoryLocator' defined in ServletContext resource [/WEB-INF/social-config.xml]: Error setting propert
y values; nested exception is org.springframework.beans.PropertyBatchUpdateException; nested PropertyAccessExceptions (1) are:|PropertyAccessException 1: org.springframework.beans.MethodInvocationExce
ption: Property 'connectionFactories' threw exception; nested exception is java.lang.NullPointerException
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1353)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1076)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:517)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
        at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:291)
        at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
        at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:288)
        at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:190)
        at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:574)
        at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:895)
        at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:425)
        at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:276)
        at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:197)
        at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:47)
        at org.eclipse.jetty.server.handler.ContextHandler.startContext(ContextHandler.java:641)
        at org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:228)
        at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1181)
        at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:584)
        at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:496)
        at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:55)
        at org.eclipse.jetty.deploy.bindings.StandardStarter.processBinding(StandardStarter.java:36)
        at org.eclipse.jetty.deploy.AppLifeCycle.runBindings(AppLifeCycle.java:180)
        at org.eclipse.jetty.deploy.DeploymentManager.requestAppGoal(DeploymentManager.java:481)
        at org.eclipse.jetty.deploy.DeploymentManager.addApp(DeploymentManager.java:137)
        at org.eclipse.jetty.deploy.providers.ScanningAppProvider.fileAdded(ScanningAppProvider.java:137)
        at org.eclipse.jetty.deploy.providers.ScanningAppProvider$1.fileAdded(ScanningAppProvider.java:50)
        at org.eclipse.jetty.util.Scanner.reportAddition(Scanner.java:470)
        at org.eclipse.jetty.util.Scanner.reportDifferences(Scanner.java:382)
        at org.eclipse.jetty.util.Scanner.scan(Scanner.java:339)
        at org.eclipse.jetty.util.Scanner.start(Scanner.java:275)
        at org.eclipse.jetty.deploy.providers.ScanningAppProvider.doStart(ScanningAppProvider.java:114)
        at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:55)
        at org.eclipse.jetty.deploy.DeploymentManager.startAppProvider(DeploymentManager.java:542)
        at org.eclipse.jetty.deploy.DeploymentManager.doStart(DeploymentManager.java:214)
        at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:55)
        at org.eclipse.jetty.server.Server.doStart(Server.java:226)
        at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:55)
        at org.eclipse.jetty.xml.XmlConfiguration$1.run(XmlConfiguration.java:1061)
        at java.security.AccessController.doPrivileged(Native Method)
        at org.eclipse.jetty.xml.XmlConfiguration.main(XmlConfiguration.java:994)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at org.eclipse.jetty.start.Main.invokeMain(Main.java:477)
        at org.eclipse.jetty.start.Main.start(Main.java:623)
        at org.eclipse.jetty.start.Main.parseCommandLine(Main.java:273)
        at org.eclipse.jetty.start.Main.main(Main.java:81)
Caused by:
org.springframework.beans.PropertyBatchUpdateException; nested PropertyAccessExceptions (1) are:|PropertyAccessException 1: org.springframework.beans.MethodInvocationException: Property 'connectionFac
tories' threw exception; nested exception is java.lang.NullPointerException
        at org.springframework.beans.AbstractPropertyAccessor.setPropertyValues(AbstractPropertyAccessor.java:102)
        at org.springframework.beans.AbstractPropertyAccessor.setPropertyValues(AbstractPropertyAccessor.java:58)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1350)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1076)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:517)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
        at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:291)
        at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
        at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:288)
        at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:190)
        at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:574)
        at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:895)
        at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:425)
        at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:276)
        at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:197)
        at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:47)
        at org.eclipse.jetty.server.handler.ContextHandler.startContext(ContextHandler.java:641)
        at org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:228)
        at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1181)
        at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:584)
        at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:496)
        at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:55)
        at org.eclipse.jetty.deploy.bindings.StandardStarter.processBinding(StandardStarter.java:36)
        at org.eclipse.jetty.deploy.AppLifeCycle.runBindings(AppLifeCycle.java:180)
        at org.eclipse.jetty.deploy.DeploymentManager.requestAppGoal(DeploymentManager.java:481)
        at org.eclipse.jetty.deploy.DeploymentManager.addApp(DeploymentManager.java:137)
        at org.eclipse.jetty.deploy.providers.ScanningAppProvider.fileAdded(ScanningAppProvider.java:137)
        at org.eclipse.jetty.deploy.providers.ScanningAppProvider$1.fileAdded(ScanningAppProvider.java:50)
        at org.eclipse.jetty.util.Scanner.reportAddition(Scanner.java:470)
        at org.eclipse.jetty.util.Scanner.reportDifferences(Scanner.java:382)
        at org.eclipse.jetty.util.Scanner.scan(Scanner.java:339)
        at org.eclipse.jetty.util.Scanner.start(Scanner.java:275)
        at org.eclipse.jetty.deploy.providers.ScanningAppProvider.doStart(ScanningAppProvider.java:114)
        at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:55)
        at org.eclipse.jetty.deploy.DeploymentManager.startAppProvider(DeploymentManager.java:542)
        at org.eclipse.jetty.deploy.DeploymentManager.doStart(DeploymentManager.java:214)
        at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:55)
        at org.eclipse.jetty.server.Server.doStart(Server.java:226)
        at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:55)
        at org.eclipse.jetty.xml.XmlConfiguration$1.run(XmlConfiguration.java:1061)
        at java.security.AccessController.doPrivileged(Native Method)
        at org.eclipse.jetty.xml.XmlConfiguration.main(XmlConfiguration.java:994)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at org.eclipse.jetty.start.Main.invokeMain(Main.java:477)
        at org.eclipse.jetty.start.Main.start(Main.java:623)
        at org.eclipse.jetty.start.Main.parseCommandLine(Main.java:273)
        at org.eclipse.jetty.start.Main.main(Main.java:81)

spring社交配置得我得xml文件:

<?xml version="1.0" encoding="UTF-8"?>

http://www.springframework.org/schema/beans/spring-beans.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd http://www.springframework.org/schema/aop/spring-aop-2.0.xsd“>

<bean id="twitterConnectionFactory"
    class="org.springframework.social.twitter.connect.TwitterConnectionFactory">
    <constructor-arg name="consumerKey" value="${twitter.app.consumerKey}" />
    <constructor-arg name="consumerSecret" value="${twitter.app.consumerSecret}" />
</bean>

<bean id="facebookConnectionFactory"
    class="org.springframework.social.facebook.connect.FacebookConnectionFactory">
    <constructor-arg name="clientId" value="${facebook.app.clientId}" />
    <constructor-arg name="clientSecret" value="${facebook.app.clientSecret}" />
</bean>
<bean id="connectionFactoryLocator"
    class="org.springframework.social.connect.support.ConnectionFactoryRegistry">
    <property name="connectionFactories">
        <list>
            <ref bean="twitterConnectionFactory" />
            <ref bean="facebookConnectionFactory" />
        </list>
    </property>
</bean>

<bean name="tokenBasedRememberMeServices"
    class="org.springframework.security.web.authentication.rememberme.TokenBasedRememberMeServices">
    <property name="userDetailsService" ref="userDetailService" />
    <property name="key" value="comsicomsa" />
</bean>
<bean id="usersConnectionRepository"
    class="com.myLogin.security.social.service.SocialUserServiceImpl" />
<bean id="connectionRepository" factory-method="createConnectionRepository"
    factory-bean="usersConnectionRepository" scope="request">
    <constructor-arg value="#{request.userPrincipal.name}" />
    <aop:scoped-proxy proxy-target-class="false" />
</bean>

null

我的POM:

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.myLogin.common</groupId>
<artifactId>SpringLoginApp</artifactId>
<packaging>war</packaging>
<version>1.0-SNAPSHOT</version>
<name>SpringLoginApp Maven Webapp</name>
<url>http://maven.apache.org</url>

<properties>
    <spring.version>3.0.3.RELEASE</spring.version>
    <jcouchdb.version>1.0.1-1</jcouchdb.version>
    <httpclient.version>4.2-alpha1</httpclient.version>
    <svenson.version>1.4.0</svenson.version>
    <junit.version>4.10</junit.version>
    <log4j.version>1.2.16</log4j.version>
    <freemarker.version>2.3.16</freemarker.version>
    <javax-validation.version>1.0.0.GA</javax-validation.version>
    <spring-social.version>1.0.0.RELEASE</spring-social.version>
    <spring-social-twitter.version>1.0.0.RELEASE</spring-social-twitter.version>
    <spring-social-facebook.version>1.0.0.RELEASE</spring-social-facebook.version>
</properties>

<dependencies>

    <!-- Spring 3 dependencies -->

    <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-core</artifactId>
        <version>${spring.version}</version>
    </dependency>

    <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-web</artifactId>
        <version>${spring.version}</version>
    </dependency>

    <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-jdbc</artifactId>
        <version>${spring.version}</version>
    </dependency>

    <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-webmvc</artifactId>
        <version>${spring.version}</version>
    </dependency>

    <!-- Spring Security -->

    <dependency>
        <groupId>org.springframework.security</groupId>
        <artifactId>spring-security-core</artifactId>
        <version>${spring.version}</version>
    </dependency>

    <dependency>
        <groupId>org.springframework.security</groupId>
        <artifactId>spring-security-web</artifactId>
        <version>${spring.version}</version>
    </dependency>

    <dependency>
        <groupId>org.springframework.security</groupId>
        <artifactId>spring-security-openid</artifactId>
        <version>${spring.version}</version>
    </dependency>

    <dependency>
        <groupId>org.springframework.security</groupId>
        <artifactId>spring-security-config</artifactId>
        <version>${spring.version}</version>
    </dependency>

    <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-test</artifactId>
        <version>${spring.version}</version>
    </dependency>



    <!-- Spring Social Core -->
    <dependency>
        <groupId>org.springframework.social</groupId>
        <artifactId>spring-social-core</artifactId>
        <version>${spring-social.version}</version>
    </dependency>
    <!-- Spring Social Web (contains login/signup controllers) -->

    <dependency>
        <groupId>org.springframework.social</groupId>
        <artifactId>spring-social-web</artifactId>
        <version>${spring-social.version}</version>
    </dependency>
    <!-- Spring Social Twitter -->
    <dependency>
        <groupId>org.springframework.social</groupId>
        <artifactId>spring-social-twitter</artifactId>
        <version>${spring-social-twitter.version}</version>
    </dependency>
    <!-- Spring Social Facebook -->
    <dependency>
        <groupId>org.springframework.social</groupId>
        <artifactId>spring-social-facebook</artifactId>
        <version>${spring-social-facebook.version}</version>
    </dependency>

    <!-- Hibernate Validator -->
    <dependency>
        <groupId>org.hibernate</groupId>
        <artifactId>hibernate-validator</artifactId>
        <version>4.2.0.Final</version>
    </dependency>

    <dependency>
        <groupId>javax.validation</groupId>
        <artifactId>validation-api</artifactId>
        <version>1.0.0.GA</version>
    </dependency>

    <dependency>
        <groupId>org.freemarker</groupId>
        <artifactId>freemarker</artifactId>
        <version>${freemarker.version}</version>
    </dependency>


    <dependency>
        <groupId>junit</groupId>
        <artifactId>junit</artifactId>
        <version>${junit.version}</version>
        <scope>test</scope>
    </dependency>
    <dependency>
        <groupId>org.apache.httpcomponents</groupId>
        <artifactId>httpclient</artifactId>
        <version>${httpclient.version}</version>
    </dependency>

    <dependency>
        <groupId>com.google.code.jcouchdb</groupId>
        <artifactId>jcouchdb</artifactId>
        <version>${jcouchdb.version}</version>
    </dependency>

    <dependency>
        <groupId>org.springframework.security</groupId>
        <artifactId>spring-security-crypto</artifactId>
        <version>3.1.0.RELEASE</version>
    </dependency>

    <dependency>
        <groupId>org.slf4j</groupId>
        <artifactId>slf4j-log4j12</artifactId>
        <version>1.6.1</version>
    </dependency>


    <!-- Java Mail API -->
    <dependency>
        <groupId>javax.mail</groupId>
        <artifactId>mail</artifactId>
        <version>1.4.3</version>
    </dependency>

    <dependency>
        <groupId>javax.servlet</groupId>
        <artifactId>servlet-api</artifactId>
        <version>2.5</version>
    </dependency>


</dependencies>

<build>
    <finalName>SpringLoginApp</finalName>
    <plugins>
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-compiler-plugin</artifactId>
            <version>2.3.2</version>
            <configuration>
                <source>1.6</source>
                <target>1.6</target>
            </configuration>
        </plugin>
    </plugins>
</build>

null

共有1个答案

柳德义
2023-03-14

首先,根据http://static.springsource.org/spring-social/docs/1.0.x/reference/html/overview.html#overview-dependencies的文档,spring Social仅支持spring 3.0.5或更高版本。(而当spring社交1.1.0发布时,它将只在spring 3.1或更高版本上得到支持。)

我的第一个建议是至少在spring 3.0.5上尝试一下(如果您有选择的话,最好在3.0.7甚至3.1.2上尝试一下)。如果这不能解决你的问题,那么我可以再深入一点。

 类似资料:
  • 我正在使用Confluent Kafka Docker镜像,特别是使用这个: https://github.com/confluentinc/cp-docker-images/tree/4.0.x/examples/cp-all-in-one 我想添加MySQL连接器,通过: 正在下载连接器的1.5.46版本(https://dev.mysql.com/get/Downloads/Connecto

  • 我的问题结合了之前在Stackoverflow上发布的两个独立问题:I .为ggplot添加多个图例;ii .将线条图例添加到geom_sf。 我想在中添加多个图例(如第一篇文章中所述),但我使用了。这使得填充美学空间变得复杂。上面i.中建议的答案不适用于多种类型的几何图形——我们不能将点和线分配给单个类,然后使用因子。在我的例子中,我有几个线和点shapefile,只是想为添加的每个shapef

  • 在本地,我的应用程序可以很好地连接到内置的netty连接工厂,并且在启动或发送主题消息方面没有问题。我的本地盒子是独立的JBoss 5.1和独立的大黄蜂Q。 但是,当部署到我们的DEV服务器(运行集群JBoss 5.1和集群HornetQ)时,我无法连接,得到以下堆栈跟踪: 我正在尝试使用默认的内置netty连接器,除了我自己的JMS主题之外,没有额外的配置。我相对不知道DEV服务器设置,因为它超

  • 问题内容: 我在一个由启动子进程的主进程组成的项目中使用PostgreSQL和SQLAlchemy。所有这些过程都通过SQLAlchemy访问数据库。 我遇到了可重复的连接失败:前几个子进程正常工作,但是过一会儿出现连接错误。这是MWCE: 在我的系统上(PostgreSQL 9.6,SQLAlchemy 1.1.4,psycopg2 2.6.2,Python 2.7,Ubuntu 14.04),

  • 问题内容: 我们可以有多个表达式来添加多个ng-class吗? 例如 如果是,那么任何人都可以举这个例子。 。 问题答案: 当不同的表达式求和时应用不同的类: 在表达式为true时应用多个类: 或者很简单: 注意css类周围的单引号。

  • 下面的代码片段是从JoinedStreams的javadoc复制的 这两个流仅基于一个键(通过< code>t =计算)进行连接 我会问我如何基于多个键进行连接,例如,one.a = two.a和