依据http://www.jfinal.com/project/22
写了一个logincontroller
com.cn.kcgl.entity.Menu; com.cn.kcgl.jeeweb.shiro.UserRealm; com.cn.kcgl.jeeweb.utils.UserUtils; com.jfinal.core.; com.jfinal.core.Controller; org.apache.shiro.SecurityUtils; org.apache.shiro.authz.annotation.; org.apache.shiro.authz.annotation.; org.apache.shiro.subject.Subject; org.springframework.ui.Model; org.springframework.web.bind.annotation.; org.springframework.web.bind.annotation.; org.springframework.web.servlet.ModelAndView; javax.servlet.http.HttpServletRequest; LoginController Controller { index(){ System..println(); render(); } (value = ) login() { String username = getPara(); String password = getPara(); render(); } }
前台 login.html
<form id="loginform" action="${ctxPath}/login" method="post">
<div class="form-group has-feedback">
<input type="text" class="form-control" placeholder="username"/>
<span class="glyphicon glyphicon-user form-control-feedback"/>
</div>
<div class="form-group has-feedback">
<input type="password" class="form-control" placeholder="Password">
<span class="glyphicon glyphicon-lock form-control-feedback"></span>
</div>
</form>
点击登录http://localhost:8093/login 后台为什么调用index()方法 在哪里可以设置下呢!
项目:JFinal
JFinal-3.4 action report -------- 2018-07-19 14:44:15 --------------------------
Url : POST /login
Controller : com.cn.kcgl.controller.LoginController.(LoginController.java:1)
Method : index
--------------------------------------------------------------------------------
我想调用login方法