首页>代码>Spring+Shiro+Mybatis实现轻量级网站后台用户权限管理系统>/renren-security/renren-api/src/main/java/io/renren/api/ApiRegisterController.java
package io.renren.api; import io.renren.service.UserService; import io.renren.utils.R; import io.renren.validator.Assert; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; /** * 注册 * @author chenshun * @email sunlightcs@gmail.com * @date 2017-03-26 17:27 */ @RestController @RequestMapping("/api") public class ApiRegisterController { @Autowired private UserService userService; /** * 注册 */ @PostMapping("register") public R register(String mobile, String password){ Assert.isBlank(mobile, "手机号不能为空"); Assert.isBlank(password, "密码不能为空"); userService.save(mobile, password); return R.ok(); } }
最近下载更多
cxdxfx12 LV14
2022年6月21日
汤汤汤要学编程 LV11
2022年3月31日
fanxiaolin84 LV10
2021年12月24日
543666826 LV33
2021年11月18日
sweetbox LV10
2021年8月5日
zmczp891216 LV2
2021年5月25日
tutuhero LV8
2021年5月13日
小海脑洞大开 LV11
2021年4月26日
缓缓归来 LV11
2021年4月16日
breakCY LV15
2021年3月9日
最近浏览更多
xuweiwowzy LV5
1月14日
WBelong LV7
2023年12月27日
fff2003 LV6
2023年11月14日
2131234536546 LV7
2023年9月8日
Hachi6 LV13
2023年8月17日
1997akkk LV5
2023年8月8日
微信网友_6511615011672064
2023年6月9日
暂无贡献等级
这次我放你玩
2023年5月22日
暂无贡献等级
黑 LV7
2023年3月29日
Wu_大花 LV1
2023年3月26日