Commit 80c1a0dd by 王军业

[跨域]

1 parent 48c118d9
package com.vion.financial.controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
@RestController
@RequestMapping(value="/api/v1/financial/contracts")
public class BaseController {
}
package com.vion.financial.controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.servlet.config.annotation.CorsRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;
@RestController
@RequestMapping(value="/api/v1/financial/contracts")
public class BaseController extends WebMvcConfigurerAdapter {
public void assCoresMappings(CorsRegistry corsRegistry) {
corsRegistry.addMapping("/**")
.allowedOrigins("*")
.allowedMethods("GET","POST","PUT","OPTION","DELETE","PATCH")
.allowCredentials(true).maxAge(3600);
}
}
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!