Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Spring Guide recommends to use obsolete method [SPR-16790] #21330

Closed
spring-issuemaster opened this issue May 3, 2018 · 1 comment
Closed

Spring Guide recommends to use obsolete method [SPR-16790] #21330

spring-issuemaster opened this issue May 3, 2018 · 1 comment

Comments

@spring-issuemaster
Copy link
Collaborator

@spring-issuemaster spring-issuemaster commented May 3, 2018

Igor Manushin opened SPR-16790 and commented

See document https://spring.io/guides/gs/rest-service-cors/#_enabling_cors

Code below tries to use deprecated WebMvcConfigurerAdapter, instead of inline interface implementation:

@Bean
public WebMvcConfigurer corsConfigurer() {
    return new WebMvcConfigurerAdapter() {
        @Override
        public void addCorsMappings(CorsRegistry registry) {
            registry.addMapping("/greeting-javaconfig").allowedOrigins("http://localhost:9000");
        }
    };
}

Affects: 5.0.5

Reference URL: spring-guides/gs-rest-service-cors#18

@spring-issuemaster
Copy link
Collaborator Author

@spring-issuemaster spring-issuemaster commented May 3, 2018

Rossen Stoyanchev commented

There is also nothing to fix in the Spring Framework, and you've already created a ticket under spring-guides. That's more than sufficient.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.