Override public boolean loginStudent stu ListStudent stulist = DBUtilqueryTableselect from Student where sid= ang pwd=Studentclass; if stulistsize==0 return false;
public class LoginTest { public static void main(String[] args) { Student stu = new Student(); stu.setSid("123456"); stu.setPwd("password");
LoginService loginService = new LoginService();
boolean result = loginService.login(stu);
if (result) {
System.out.println("Login success");
} else {
System.out.println("Login failed");
}
}
}
AI 优化版
原文地址:https://www.cveoy.top/t/topic/i143 著作权归作者所有。请勿转载和采集!