spring boot callbackUrl ConnectSupport [英] spring boot callbackUrl ConnectSupport

查看:28
本文介绍了spring boot callbackUrl ConnectSupport的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在 ConnectSupport 中重载 callbackUrl

I want to overload callbackUrl in ConnectSupport

我使用 Spring Boot Connect:org.springframework.social:spring-social-core:jar:1.1.0.RELEASE:compile

I use Spring boot Connect : org.springframework.social:spring-social-core:jar:1.1.0.RELEASE:compile

@Bean
public ConnectController connectController(
        ConnectionFactoryLocator connectionFactoryLocator,
        ConnectionRepository connectionRepository) {

    ConnectController controller = new ConnectController(connectionFactoryLocator,
            connectionRepository);

        controller.set callbackUrl  ??
        return controller;

}

推荐答案

Spring Social Api 可用 此处.您需要调用 setApplicationUrl().

Spring Social Api is available here. You need to call the setApplicationUrl().

@Bean
public ConnectController connectController(ConnectionFactoryLocator connectionFactoryLocator,
        ConnectionRepository connectionRepository) {

    ConnectController controller = new ConnectController(connectionFactoryLocator,
            connectionRepository);
        String url = "www.foo.com";
        controller.setApplicationUrl(url) ;
        return controller;

}

这篇关于spring boot callbackUrl ConnectSupport的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆