| | |
| | | import org.apache.shiro.crypto.hash.SimpleHash; |
| | | import org.apache.shiro.util.ByteSource; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.HashMap; |
| | | |
| | | @RestController |
| | | |
| | | @Slf4j |
| | | @Api(tags = "登录和注册") |
| | | public class DefaultController { |
| | |
| | | } |
| | | |
| | | @ApiOperation(value = "登录") |
| | | @CrossOrigin(origins = "http://localhost:8080", allowCredentials = "true") |
| | | @PostMapping("/login") |
| | | public Result login(@RequestBody UserVo userVO) { |
| | | ValidatorUtil.validateEntity(userVO); |