- 博客(6)
- 收藏
- 关注
原创 【SSM】实现登录查询与过滤查询
代码package com.zr0701.bean;public class User { private int id; private String name; private String password; public int getId() { return id; } public void setId(int id) { this.id = id; } @Override pu
2020-07-06 23:15:03
97
原创 【SSM】列表实现删除和增加
代码package com.zr0701.controller;import com.zr0701.bean.User;import com.zr0701.service.UserService;import org.springframework.beans.factory.annotation.Autowired;import org.springframework.stereotype.Controller;import org.springframework.web.bind.anno
2020-07-02 23:02:45
128
原创 【Web】Servlet的注册与注销
注册代码UserService userService = new UserService();protected void doPost(HttpServletRequest req, HttpServletResponse resp)throws ServletException, IOException {System.out.println(“dPost is used”);String method = req.getParameter(“method”);if(method.equa
2020-06-30 22:49:27
192
原创 【JAVA】事务回滚与网页跳转
【JAVA】事务回滚与网页跳转代码Connection conn=null;PreparedStatement pstmt1=null;PreparedStatement pstmt2=null;try{//获取连接conn=JDBCUtils.getConnection();//开启事务conn.setAutoCommit(false);//定义sqlString sql1=“update account set balance = balance - ? where id= ?”;
2020-06-29 23:06:59
144
原创 【JAVA】斗地主发牌与理牌
发牌public static void main(String[] args) {List pokes=new ArrayList<>(); List<String> colors=new ArrayList<>(); List<String> numbers=new ArrayList<>(); colors.add("♥"); colors.add("♠"); colors.add("♦");
2020-06-28 23:19:55
138
原创 连接Mysql的简单注册
连接Mysql的简单注册代码//import java.sql.*;import java.util.Scanner;public class jdbcdl { public static void main(String[]args) throws SQLException,ClassNotFoundException { /*Class.forName("com.mysql.jdbc.Driver"); Connection connection = D
2020-06-28 15:26:09
117
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人