1package com.student_loan.config;
5import org.springframework.context.annotation.Bean;
6import org.springframework.context.annotation.Configuration;
7import org.springframework.web.servlet.config.annotation.CorsRegistry;
8import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
15 return new WebMvcConfigurer() {
17 public void addCorsMappings(CorsRegistry registry) {
18 registry.addMapping(
"/**")
19 .allowedOrigins(
"http://localhost:3000")
20 .allowedMethods(
"GET",
"POST",
"PUT",
"DELETE",
"OPTIONS")
22 .allowCredentials(
true);
WebMvcConfigurer corsConfigurer()