首页>代码>vue+springboot前后端分离项目实例,外加socket服务端和客户端代码实例>/myspringboot/src/main/java/com/zks/controller/UserController.java
package com.zks.controller;

import com.zks.model.MyResult;
import com.zks.model.User;
import com.zks.service.UserService;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * @author :zhoukaishun
 * @date :Created in 2019/5/9 9:36
 * @description:${description}
 * @modified By:
 * @version: $version$
 */
@Controller
@RequestMapping(value = "/user")
public class UserController {

    @Autowired
    private UserService userService;
    @ResponseBody
    @PostMapping("/login")
    public MyResult login(@RequestBody User user){
        return userService.login(user);
    }


    @ResponseBody
    @RequestMapping("/test")
    public String test(){
        System.out.println("123456");
        return "123";
    }
}
最近下载更多
abdkfksdkf  LV16 2023年10月11日
浮生如茶  LV8 2023年8月30日
livealon  LV2 2023年6月12日
277015530  LV2 2023年4月27日
上世纪风景  LV11 2023年4月1日
qwe123456asd  LV3 2023年3月9日
hbsoft2008  LV16 2023年2月17日
xiaoyuer2  LV8 2022年11月16日
ewan007  LV30 2022年6月24日
bearloadprogress  LV7 2022年5月12日
最近浏览更多
gann2015  LV25 4月8日
calm_z  LV2 3月23日
zyfile  LV1 1月13日
笨小孩一号  LV22 2024年11月26日
Daima000  LV4 2024年11月25日
krispeng  LV14 2024年8月25日
TY0165  LV20 2024年7月20日
樱花味小然子  LV5 2024年7月18日
yangchengshuai  LV15 2024年7月18日
顶部 客服 微信二维码 底部
>扫描二维码关注最代码为好友扫描二维码关注最代码为好友