数据库用户登录
数据表
//USER的BEAN对象类就自己建吧,对应自己的数据库来建立
package com.server;import java.util.List;import com.pojo.Student;
import com.pojo.Teacher;
import com.pojo.User;
import com.pojo.userInfo;
import com.untils.DataBaseConnection;public class userSever {
public userSever() {
// TODO Auto-generated constructor stub
System.out.println(123);
}
public userInfo login(User user) {
System.out.println(123);
//SELECT * FROM user WHERE user_name = ? AND password = ?
List<User> users = DataBaseConnection.query("SELECT * FROM user WHERE user_name = ? AND password = ?",User.class, user.getUserName(), user.getPassword());
System.out.println(4647);
System.out.println(users.size());
if (users == null || users.size() == 0) {
System.out.println("判定属性");
retu