跨域问题的解决
重点就是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();
}
}