- 博客(11)
- 收藏
- 关注
原创 线上实习 壮志凌云——编写博客
//BlogServiceImpl @Service public class BlogServiceImpl implements IBlogService { @Autowired private BlogDao blogDao; @Override public Page listBlog(Pageable pageable) { return blogDao.findAll(pageable); } @Override public void deleteById(Long id) { blogDa
2020-07-13 20:20:15
385
原创 线上实习 永矢弗谖——博客管理
//BlogController package com.zr.web; import com.zr.po.Blog; import com.zr.po.Tag; import com.zr.po.User; import com.zr.service.IBlogService; import com.zr.service.ITagService; import com.zr.service.ITypeService; import org.springframework.beans.factory.ann
2020-07-11 15:26:13
189
原创 线上实习 破釜成舟——增删改查
//TypeController package com.zr.web; import com.zr.po.Type; import com.zr.service.ITypeService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.data.domain.Page; import org.springframework.data.domain.Pageable; imp
2020-07-09 22:16:48
143
原创 线上实习 奋勇向前——博客登陆
//LoginController @Controller @RequestMapping("/admin") public class LoginController { @Autowired private IUserService userService; @GetMapping public String toLogin(){ return “admin/login”; } @PostMapping("/login") public String login(String username, Str
2020-07-07 20:18:39
122
原创 线上实习 扬帆起航——添加权限
//UserController @RequestMapping("/login.do") public ModelAndView login(User user, HttpSession session){ int id = userService.login(user.getUsername(), user.getPassword()); ModelAndView modelAndView=new ModelAndView(); if(id!=-1){ List roleIds = roleServic
2020-07-06 20:59:11
203
原创 线上实习 终见篇章——模糊查询
//UserController @RequestMapping("/deleteAll.do") public String deleteAll(String userList){ String[] strs = userList.split(","); List ids = new ArrayList<>(); for(String s:strs){ ids.add(Integer.parseInt(s)); } userService.deleteAll(ids); return “red
2020-07-03 15:38:01
144
原创 线上实习 日趋大成——分页设置
//PageInfo package com.zhongruan.bean; import java.util.List; public class PageInfo { private List list; private int totalPage; private int size; private int totalCount; private int currentPage; public List<T> getList() { return list; } public v
2020-07-02 16:32:25
108
原创 线上实习 日渐熟练——增删改查
//UserController package com.zhongruan.controller; import com.zhongruan.bean.User; import com.zhongruan.service.IUserService; import com.zhongruan.service.impl.UserService; import org.springframework.beans.factory.annotation.Autowired; import org.springfra
2020-07-01 19:09:06
287
原创 线上实训 锋芒毕露——用户查询
//User package com.zhongruan.bean; import com.mchange.v2.c3p0.ComboPooledDataSource; public class User { public User() { } public User(int id, String username, String password) { this.id = id; this.username = username; this.password = password
2020-06-30 16:20:13
185
原创 线上实习 渐露锋角——登陆界面
//User package com.zr.bean; 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, String password) { t
2020-06-29 18:38:34
150
原创 线上实习 牛刀小试——增删改查
//增加 package com.zr; import com.zr.util.DBUtil; import java.sql.Connection; import java.sql.PreparedStatement; import java.sql.SQLException; public class Add { public static void main(String[] args) throws ClassNotFoundException, SQLException { Connection
2020-06-28 13:52:27
191
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人