Ai-interviewer-system/src/main/java/com/yzdx/AiInterviewer/controller/HelloController.java

37 lines
997 B
Java
Raw Normal View History

2023-10-13 13:50:21 +00:00
package com.yzdx.AiInterviewer.controller;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.HashMap;
import java.util.Map;
@RestController
@RequestMapping("/hello")
public class HelloController {
@GetMapping("/hello")
public String hello(){
return "hello";
}
@ApiOperation("用户登录")
@PostMapping("/test")
public Map<String ,Object> testLogin(@ApiParam("用户名") String username ,@ApiParam("密码")String password){
Map<String ,Object> result=new HashMap<>();
result.put("code",0);
result.put("message","登陆成功");
result.put("data","username:"+username+","+"password:"+password);
return result;
}
}