Spring Social的自动配置’;连接控制器不工作
我已经按照下面网站中给出的步骤创建了一个简单的spring boot应用程序,使用maven和spring boot访问facebook数据 这也和gradle一样 我面临的问题是,当我尝试运行应用程序时,我看到url成功重定向到“/connect/facebook”,但它没有加载facebookConnect.html,而是抛出错误 如下图所示: " 白标错误页面 此应用程序没有/error的显式映射,因此您将其视为一种回退。 2015年3月10日星期二19:24:41 出现意外错误(类型=方法不允许,状态=405)。 不支持请求方法“GET” " 我也尝试过使用网站上给出的相同代码,并在其中使用了我的facebook appId和appSecret,这是我通过在facebook应用程序中提供随机主机名生成的,但我仍然得到了相同的错误 我还尝试将我创建的随机主机名添加到windows中的/etc/hosts文件中 有人能帮我解释一下为什么我不能看到ConnectController自动呈现的.html页面吗?我终于得到了答案。 我们需要在application.properties文件中添加额外的参数 “spring.social.auto\u connection\u views=true 还有身份证和秘密 spring.social.facebook.appId= spring.social.facebook.appSecret= 教程中没有提到此属性。最后,此属性成功了。:) “我终于得到了答案。 我们需要在application.properties文件中添加额外的参数 “spring.social.auto\u connection\u views=true 还有身份证和秘密 spring.social.facebook.appId= spring.social.facebook.appSecret= 教程中没有提到此属性。最后,此属性成功了。:) “我终于得到了答案。 我们需要在application.properties文件中添加额外的参数 “spring.social.auto\u connection\u views=true 还有身份证和秘密 spring.social.facebook.appId= spring.social.facebook.appSecret= 教程中没有提到此属性。最后,此属性成功了。:) “我终于得到了答案。 我们需要在application.properties文件中添加额外的参数 “spring.social.auto\u connection\u views=true 还有身份证和秘密 spring.social.facebook.appId= spring.social.facebook.appSecret= 教程中没有提到此属性。最后,此属性成功了。:)Spring Social的自动配置’;连接控制器不工作,spring,spring-mvc,spring-boot,spring-social,spring-social-facebook,Spring,Spring Mvc,Spring Boot,Spring Social,Spring Social Facebook,我已经按照下面网站中给出的步骤创建了一个简单的spring boot应用程序,使用maven和spring boot访问facebook数据 这也和gradle一样 我面临的问题是,当我尝试运行应用程序时,我看到url成功重定向到“/connect/facebook”,但它没有加载facebookConnect.html,而是抛出错误 如下图所示: " 白标错误页面 此应用程序没有/error的显式映射,因此您将其视为一种回退。 2015年3月10日星期二19:24:41 出现意外错误(类型=
“也有同样的问题
spring.social.auto-connection-views:true
在应用程序.yml
(或.parameter等效)中确实解决了这个问题,但随后使用了默认的facebookConnect.html
和facebookConnected.html
我通过删除上面的应用程序参数并简单地向pom.xml
添加Thymeleaf诱人的引擎来解决这个问题:
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-thymeleaf</artifactId>
</dependency>
org.springframework.boot
弹簧启动装置
然后您可以使用自己的facebookConnect.html
和facebookConnected.html
位于src/main/resources/templates/connect/
希望能有所帮助。也有同样的问题
spring.social.auto-connection-views:true
在应用程序.yml
(或.parameter等效)中确实解决了这个问题,但随后使用了默认的facebookConnect.html
和facebookConnected.html
我通过删除上面的应用程序参数并简单地向pom.xml
添加Thymeleaf诱人的引擎来解决这个问题:
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-thymeleaf</artifactId>
</dependency>
org.springframework.boot
弹簧启动装置
然后您可以使用自己的facebookConnect.html
和facebookConnected.html
位于src/main/resources/templates/connect/
希望能有所帮助。也有同样的问题
spring.social.auto-connection-views:true
在应用程序.yml
(或.parameter等效)中确实解决了这个问题,但随后使用了默认的facebookConnect.html
和facebookConnected.html
我通过删除上面的应用程序参数并简单地向pom.xml
添加Thymeleaf诱人的引擎来解决这个问题:
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-thymeleaf</artifactId>
</dependency>
org.springframework.boot
弹簧启动装置
然后您可以使用自己的facebookConnect.html
和facebookConnected.html
位于src/main/resources/templates/connect/
希望能有所帮助。也有同样的问题
spring.social.auto-connection-views:true
在应用程序.yml
(或.parameter等效)中确实解决了这个问题,但随后使用了默认的facebookConnect.html
和facebookConnected.html
我通过删除上面的应用程序参数并简单地向pom.xml
添加Thymeleaf诱人的引擎来解决这个问题:
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-thymeleaf</artifactId>
</dependency>
org.springframework.boot
弹簧启动装置
然后您可以使用自己的facebookConnect.html
和facebookConnected.html
位于src/main/resources/templates/connect/
希望它能有所帮助。你是对的,它正在重定向到url/connect/facebook,但有错误,在服务器端,你没有处理/connect/facebook/错误,这就是为什么它不是