Spring Boot接口如何配置跨域访问 2020-11-02 2020-11-02 CORS, Java, Kotlin, Spring Boot 123456@Beanfun webMvcConfigurer() = object : WebMvcConfigurer { override fun addCorsMappings(registry: CorsRegistry) { registry.addMapping("/api/**").allowedOrigins("http://localhost:3000", "https://blog.pisikeji.com") }}