📜  CORS 配置 - 任何代码示例

📅  最后修改于: 2022-03-11 14:59:54.841000             🧑  作者: Mango

代码示例1
@CrossOrigin(origins = "http://localhost:8080")
    @GetMapping("/greeting")
    public Greeting greeting(@RequestParam(required = false, defaultValue = "World") String name) {
        System.out.println("==== get greeting ====");
        return new Greeting(counter.incrementAndGet(), String.format(template, name));COPY