Closed soulmachine closed 6 years ago
Problem is because of this bean :
As stated in the error message, you now have to return CorsFilter instance directly.
So change to this
@Bean
public CorsFilter corsFilter() {
UrlBasedCorsConfigurationSource source = new UrlBasedCorsConfigurationSource();
CorsConfiguration config = new CorsConfiguration();
config.setAllowCredentials(true);
config.addAllowedOrigin("*");
config.addAllowedHeader("*");
config.addAllowedMethod("*");
source.registerCorsConfiguration("/**", config);
return new CorsFilter(source);
}
Thanks! I changed the method name from corsFilter()
to a different one and problem solved, inspired by this https://github.com/spring-projects/spring-security-oauth/issues/938
Thanks! I changed the method name from
corsFilter()
to a different one and problem solved, inspired by this spring-projects/spring-security-oauth#938
interestig, but why?
Dear,
First of all, congratulations for the initiative!
I would like to know if this code can be adapted to that of Coderef, which is in version 1.5. Could you give some tips on how to migrate to 2.0.4?
Thank you!
Changing the method name from corsFilter() to a different one solved the issue. Thank you @soulmachine
If I upgrade Spring Boot from
1.5.3.RELEASE
to1.5.8.RELEASE
,then
./mvnw clean package
fails with the following error: