- 博客(6)
- 收藏
- 关注
原创 ssm 实现分页和拦截
变动代码 1.controller层 @RequestMapping("/findAll.do") public ModelAndView findAll(@RequestParam(defaultValue = "1") int currentPage) { PageInfo<User> pageInfo=userService.findAll(currentPage); ModelAndView modelAndView = new ModelAndView();
2020-07-06 22:57:35
160
原创 修改操作 ssm
1.controller层代码 @RequestMapping("/update.do") public String update(User user){ userService.update( user ); return "redirect:findAll.do "; } 2.Dao,Service新加代码 public interface UserDao { User findUserByUserName(String username); List<Use
2020-07-05 14:58:19
330
原创 SSM 查询实现
1.bean目录下的user类 public class User { public User() { } public User(int id, String username, String password) { this.id = id; this.username = username; this.password = password; } public User(String username, St
2020-07-02 10:53:06
489
原创 JDBC +Tomcat实现登录逻辑
1.Bean目录下的User类 public class User { public User() { } public User(int id, String username, String password) { this.id = id; this.username = username; this.password = password; } public User(String username, Str
2020-06-29 23:41:40
168
原创 利用JDBC对数据库进行操作
0.工具类的实现 import java.sql.*; public class JdbcUtil { public static Connection getConnection() throws SQLException, ClassNotFoundException { Class.forName("com.mysql.jdbc.Driver"); Connection connection = DriverManager.getConnection("jdb
2020-06-28 22:46:34
249
原创 斗地主发牌实现程序
斗地主发牌Java实现 发牌的实现类 import java.util.ArrayList; import java.util.List; import static java.util.Collections.swap; public class Brand { public static ArrayList<String> sort(ArrayList<String> player) { List<Integer> num1 = new A
2020-06-27 23:50:10
756
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人
RSS订阅