![](https://img-blog.csdnimg.cn/20201014180756923.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
java实习
wjsjzmzml
这个作者很懒,什么都没留下…
展开
-
Spring Boot实现文章分类和文章标签
实现文章分类和文章标签环境MySql 5.0.67Spring Boot 2.3.1mysql-connector-java 5.1.37t_type表中包含id,name字段t_tag表中包含id,name字段t_blog_tags表包含blogs_id,tags_id字段t_blog表至少包含id,type_id,user_id字段这是对上文的扩展博客功能删除//修改BlogController@GetMapping("{id}/delete")public Strin原创 2020-07-14 23:06:43 · 558 阅读 · 3 评论 -
Spring Boot实现标签分页
实现标签分页环境MySql 5.0.67Spring Boot 2.3.1mysql-connector-java 5.1.37Type字段有id,name项目结构TypeController@Controller@RequestMapping("/admin/types")public class TypeController { @Autowired private ITypeService iTypeService; @GetMapping原创 2020-07-14 19:45:12 · 159 阅读 · 0 评论 -
Spring Boot 实现用户登录与退出
环境MySql 5.0.67Spring Boot 2.3.1mysql-connector-java 5.1.37数据库中有至少有id,username,password三个字段Dao层//UserDaopublic interface UserDao extends JpaRepository<User, Long> { User findByUsernameAndPassword(String username, String password);}Po层原创 2020-07-07 23:05:55 · 1055 阅读 · 0 评论 -
SSM框架对用户进行角色管理
环境表tb_user中有三个字段:id(自增),username,passwordbean下已有User,PageInfo类Tomcat 9.0MySql 5.0.67新建Role和UserRole类在bean下新建Role和UserRole类//Rolepublic class Role { private int id; private String rolename; private String roledesc; public int getI原创 2020-07-07 21:23:14 · 136 阅读 · 0 评论 -
SSM框架下模糊查询
PageInfoimport java.util.List;public class PageInfo<T> { private List<T> list; private int totalPage; private int size; private int totalCount; private int currentPage; public List<T> getList() { return原创 2020-07-03 23:35:34 · 436 阅读 · 1 评论 -
JDBC+MySQL+JSP+Servlet实现简单网页登录
实体类Userpublic 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 pass原创 2020-06-29 23:02:50 · 254 阅读 · 0 评论 -
java简单连接MySQL
查询import com.JDBC.until.DBUtil;import java.sql.*;public class Find { public static void main(String[] args) throws SQLException { try { Connection connection = DBUtil.getConnection(); //写SQL语句 String sq原创 2020-06-28 18:20:41 · 97 阅读 · 0 评论 -
JAVA实现发牌洗牌并排序
生成牌public static void main(String[] args) { List<String> pokes = new ArrayList<>(); List<String> colors = new ArrayList<>(); List<String> numbers = new ArrayList<>(); colors.add("❤");//生成花色 colors.a原创 2020-06-27 17:06:40 · 500 阅读 · 0 评论