首页>代码>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  LV15 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  LV29 2022年6月24日
bearloadprogress  LV7 2022年5月12日
最近浏览更多
wppppp  LV3 4月3日
3263394665  LV9 3月15日
siximu912  LV10 1月23日
3025233006  LV1 2023年12月8日
1515465193  LV9 2023年11月30日
wuying8208  LV15 2023年11月25日
小温ggggg  LV6 2023年10月14日
abdkfksdkf  LV15 2023年10月11日
2304972630  LV3 2023年9月26日
ytiian_hm  LV6 2023年9月17日
顶部 客服 微信二维码 底部
>扫描二维码关注最代码为好友扫描二维码关注最代码为好友