跨域問(wèn)題的解決
重點(diǎn)就是java端的RESTful API 加上CrossOrigin喊括,允許跨域。
@CrossOrigin(origins = "*", allowedHeaders = "*")
@RestController
@RequestMapping("/persons")
public class PersonController {
@Autowired
PersonService ps;
@Autowired
aaService aa;
@CrossOrigin(origins = "*", allowedHeaders = "*")
@RequestMapping(value ="/trigger", method = RequestMethod.GET)
public String trigger() throws IOException{
return aa.deployBotViaAPIReadCSV();
}
}