无法从salesforce站点重定向回Spring Boot JSP

我正在开发Spring Boot + Apache Oltu + Salesforce Integration示例。 在这个例子中,我试图调用Salesforce URL,但它应该通过Controller进行,但不会被调用。 问题是什么?

在后端,以下是执行,但不知道为什么它不重定向? 有什么快速帮助?

@RequestMapping(value = "/redirect", method = RequestMethod.GET) public HttpEntity redirect( @RequestParam(value = "code", required = false) String code) throws OAuthSystemException, OAuthProblemException { String value = "UNKNOWN"; if (code != null && code.length() > 0) { System.out.println("Received CODE: "+code); String details = getAccessToken(code); value = details; } return new ResponseEntity(value,HttpStatus.OK); } 

WebSecurityConfig

 @Configuration @EnableWebSecurity public class WebSecurityConfig extends WebSecurityConfigurerAdapter { @Autowired private UserDetailsService userDetailsService; @Bean public BCryptPasswordEncoder bCryptPasswordEncoder() { return new BCryptPasswordEncoder(); } @Override protected void configure(HttpSecurity http) throws Exception { http .authorizeRequests() .antMatchers("/resources/**", "/registration", "/salesforce/auth", "/salesforce/redirect").permitAll() .anyRequest().authenticated() .and() .formLogin() .loginPage("/login") .permitAll() .and() .logout() .permitAll(); } @Autowired public void configureGlobal(AuthenticationManagerBuilder auth) throws Exception { auth.userDetailsService(userDetailsService).passwordEncoder(bCryptPasswordEncoder()); } } 

但仍然显示http:// localhost:8080 / login ,为什么?

不确定为什么重定向没有发生:

HTTP://本地主机:8080 /阿帕奇-oltu /销售队伍/重定向代码= aPrxshT49BthlzIhcGw5DiH5uBDzeR.BbHhlGSa9RzKfInabJjpj0vcvNzot.iX1zhyqW4EDsA%3D%3D

为什么上面的Controller方法没有调用

在此处输入图像描述