package com.example.testcors.controller;

import com.example.testcors.domain.User;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

@RestController
// 局部跨域
@CrossOrigin
public class LoginController {

    @PostMapping("/login")
    public String login(@RequestBody User user){
        return "HelloWorld";
    }

}
