📜  cors spring 方法或类 - 任何代码示例

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

代码示例2
@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