⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 loginbankcontroller.java

📁 白广元写的java web整合开发完全自学手册的源代码
💻 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;
	}
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -