diff --git a/conf/szwh.properties b/conf/szwh.properties index 32103a8..ebd3f2b 100644 --- a/conf/szwh.properties +++ b/conf/szwh.properties @@ -1,3 +1,5 @@ +# jwt 密钥 +jwt.key=wenhuayun_token_ # 用户认证 user.pem.prikey.path=/conf/cert/user_real/private_key.pem user.pem.pubkey.path=/conf/cert/user_real/public_key.pem diff --git a/src/main/java/cn/chjyj/szwh/controller/admin/AdminLoginController.java b/src/main/java/cn/chjyj/szwh/controller/admin/AdminLoginController.java new file mode 100644 index 0000000..02a233d --- /dev/null +++ b/src/main/java/cn/chjyj/szwh/controller/admin/AdminLoginController.java @@ -0,0 +1,32 @@ +package cn.chjyj.szwh.controller.admin; + +import cn.chjyj.szwh.controller.BaseController; +import cn.chjyj.szwh.exception.ChException; +import com.alibaba.fastjson.JSONObject; +import org.apache.commons.lang3.StringUtils; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +/** + * 管理人员登录 + * xy + */ +@RestController +@RequestMapping("/admin/Login") +public class AdminLoginController extends BaseController { + /** + * 登录 + * @return + */ + @RequestMapping("/login") + public JSONObject login(String username,String password){ + if(StringUtils.isEmpty(username)){ + jsonObject.put("msg","用户名必须填写"); + } + if(StringUtils.isEmpty(password)){ + jsonObject.put("msg","密码必须填写"); + } + //todo 远程登陆?? + return jsonObject; + } +}