?? loginbankcontroller.java
字號:
package springexample.contoller;
import org.springframework.web.servlet.ModelAndView;
import org.springframework.web.servlet.mvc.SimpleFormController;
import springexample.commands.AccountDetail;
import springexample.commands.LoginCommand;
import springexample.services.AccountServices;
import springexample.services.AuthenticationService;
/**
* @author naveenb
*/
public class LoginBankController extends SimpleFormController {
public LoginBankController(){
}
protected ModelAndView onSubmit(Object command) throws Exception{
LoginCommand loginCommand = (LoginCommand) command;
authenticationService.authenticate(loginCommand);
AccountDetail accountdetail = accountServices.getAccountSummary(loginCommand.getUserId());
return new ModelAndView(getSuccessView(),"accountdetail",accountdetail);
}
private AuthenticationService authenticationService;
private AccountServices accountServices;
/**
* @return Returns the accountServices.
*/
public AccountServices getAccountServices() {
return accountServices;
}
/**
* @param accountServices The accountServices to set.
*/
public void setAccountServices(AccountServices accountServices) {
this.accountServices = accountServices;
}
/**
* @return Returns the authenticationService.
*/
public AuthenticationService getAuthenticationService() {
return authenticationService;
}
/**
* @param authenticationService The authenticationService to set.
*/
public void setAuthenticationService(
AuthenticationService authenticationService) {
this.authenticationService = authenticationService;
}
}
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -