Tag:java jdbc database
JDBC package connection is a good premise: systemauthorizingrealm c = new Systemauthorizingrealm (); conn = C.getconnection ();//conn = ((DataSource) Springcontextutil.getbean ("DataSource"). getconnection () ; PreparedStatement PS = conn.preparestatement (SQL); Ps.setstring (I1, Token.getusername (). Trim ()); Ps.setstring (I2, Encrypt.getmd5 (string.valueof (Token.getpassword ())). Trim ()); System.out.println (Encrypt.getmd5 (string.valueof (Token.getpassword ())); //when executed here, I can query the data when I put SQL and related parameters into the tool; ResU Ltset rs = Ps.executequery (); //This is actually printed false, supposedly the data should be true, right? System.out.println (Rs.next ()); does that help guide you?
Query data for Java JDBC Connection database and queries for direct use of SQL