still getting CORS error spring boot and angular : I'm using Spring Boot 2.0.2 , I have spring-starter-web and spring-data-jpa in my project, Im' not using Spring Security for the moment.
I created RestControllers and added @CrossOrigin annotation to them, and tried this code to enable CORS for my angular app 
    
    @Bean
    public WebMvcConfigurer corsConfigurer() {
    return new WebMvcConfigurer() {
    @Override
    public void addCorsMappings(CorsRegistry registry) {
    registry.addMapping("/**")..allowedOrigins("*").allowedMethods("GET","POST","DELETE","PATCH","OPTIONS");
            }
            }
        };
    }

But still getting CORS Error from my angular app