- 博客(10)
- 收藏
- 关注
原创 java-blog-0713
blog.class@Entity@Table(name = “t_blog”)public class Blog {@Id@GeneratedValueprivate Long id;private String title;@Basic(fetch = FetchType.LAZY)@Lobprivate String content;private String firstPicture;private String flag;private Integer views;
2020-07-14 17:19:33
205
原创 java-blog
Blog@Entity@Table(name = “t_blog”)public class Blog {@Id@GeneratedValueprivate Long id;private String title;@Basic(fetch = FetchType.LAZY)@Lobprivate String content;private String firstPicture;private String flag;private Integer views;priva
2020-07-11 15:26:47
209
原创 JAVA语言用springboot框架实现简单的登录
dao.UserDaopackage com.zr.dao;import com.zr.po.User;import org.springframework.data.jpa.repository.JpaRepository;public interface UserDao extends JpaRepository<User,Long> {User findByUsernameAndPassword(String username, String password);}po.B
2020-07-07 20:18:10
518
原创 java语言简单实现角色添加
rolemapper.xml select roleId from user_role where userId=#{userId} select * from tb_role WHERE id NOT IN (SELECT roleId FROM user_role WHERE userId=#{id}) RoleService@Servicepublic class RoleService implements IRoleS
2020-07-06 20:19:22
408
原创 java语言实现简单的模糊查询
UserService@Overridepublic void deleteAll(List ids) {userDao.deleteAll(ids);}UserController@RequestMapping(“deleteAll.do”)public String deleteAll(String userList){String[] strs = userList.split(",");List ids=new ArrayList<>();for(String s:s
2020-07-03 16:25:39
1814
原创 java实现简单的分页管理和拦截器
Pageinfo类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 void setList(List<T> list) { this.list = li
2020-07-02 16:23:14
439
原创 java语言实现简单的增删改查
UserControllerpackage com.zhongruan.controller;import com.zhongruan.bean.User;import com.zhongruan.service.IUserService;import org.springframework.beans.factory.annotation.Autowired;import org.springframework.stereotype.Controller;import org.springfr
2020-07-01 16:04:08
709
原创 java语言简单编写登录及用户简单查询
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:21:09
364
原创 崭露头角
查询package com.zr.servlet;import com.zr.bean.User;import com.zr.util.DBUtil;import java.sql.*;import java.util.ArrayList;import java.util.List;public class find {public User findAll(String username){Connection connection= null;PreparedStatement st
2020-06-29 19:00:21
135
原创 java数据库连接和增删改查
//增加package com.zr;import util.DBUtil;import java.sql.*;public class Find {public static void main(String[] args) throws ClassNotFoundException, SQLException {Connection connection = DBUtil.getConnection();System.out.println(“创建连接成功”);//3.写sql语句St
2020-06-28 13:58:24
182
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人