首页>代码>springboot2整合vue开发在线音乐网站>/music-server/src/main/java/com/example/demo/config/WebMvcConfig.java
package com.example.demo.config;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.CorsRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;
@Configuration
public class WebMvcConfig extends WebMvcConfigurerAdapter {
@Override
public void addCorsMappings(CorsRegistry registry) {
registry.addMapping("/**")
.allowedOrigins("*")
.allowedMethods("*")
.allowCredentials(true);
}
}
最近下载更多
最近浏览更多
zhangxuefu LV11
11月14日
ofeiyuo LV7
11月9日
khmumuno
10月25日
暂无贡献等级
ds9009 LV8
10月23日
wj3679 LV13
10月21日
perfect LV17
10月11日
xiaotao555555 LV3
9月21日
爱情戴罪的羔羊 LV7
9月10日
vincemokea LV9
9月8日
xiaoyumao LV2
8月23日

