?? authenticationservice.java
字號:
/*
* Created on Jul 13, 2005
*
* TODO To change the template for this generated file go to
* Window - Preferences - Java - Code Style - Code Templates
*/
package springexample.services;
import springexample.commands.LoginCommand;
/**
* @author naveenb
*/
public class AuthenticationService {
public AuthenticationService(){
}
public void authenticate(LoginCommand command) throws Exception{
//Check with some dummy data.
if(command.getUserId()!= null && command.getUserId().equalsIgnoreCase("admin")
&& command.getPassword()!= null && command.getPassword().equalsIgnoreCase("password")){
System.out.println("Login sucessful");
}else{
throw new Exception("User id is not authenticated");
}
}
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -