Java Swing + MySQL图书借阅管理系统

系列文章目录

Java Swing + MySQL 图书管理系统
Java Swing + MySQL 图书借阅管理系统


文章目录

  • 系列文章目录
  • 前言
  • 一、项目展示
  • 二、部分代码
    • 1.Book
    • 2.BookDao
    • 3.DBUtil
    • 4.BookAddInternalFrame
    • 5.Login
  • 三、配置


前言

项目是使用Java swing开发,界面设计比较简洁、适合作为Java课设设计以及学习技术使用。

  • 语言:Java
  • 界面:JavaSwing
  • 数据库:MySQL 8.x

具体功能如下:
1、基础功能
(1)系统登录功能:用户可以通过用户名和密码登录系统。
(2)图书分类管理功能:管理员可以对于图书的类别进行增、删、改、查操作。
(3)图书信息管理功能:能够增、删图书,修改图书名称、类别、价格等信息。
(4)图书借阅管理功能:包括图书借出和图书归还等操作,设计功能时需要考虑逾期情况的判别和处理。
2、可选加分功能
(1)借阅记录查询功能:学生可以查看自己在某时间段之内的借阅记录;管理员可以按照学号查询学生的借阅记录。(ps:只有管理员能够增删改查图书内容,用户只有查找书的信息的权限)

一、项目展示

image-20240527010008617

image-20240527010154137

image

image-20240527010339195

image-20240527010419245

image-20240527010455653

image-20240527010518137

image-20240527010632545

image-20240527010649613
image-20240527011013968

二、部分代码

1.Book

代码如下(示例):

package entity;/*** BookManagementSystem* 图书** @author PlutoCtx* @version 2024/5/26 1:07* @email ctx195467@163.com* @since JDK17*/public class Book {/*** 图书id*/private int id;/*** 书名*/private String bookName;/*** 作者*/private String author;/*** 图书数量*/private int number;/*** 价格*/private Float price;/*** 图书类别*/private Integer bookTypeId;/*** 图书类别*/private String bookTypeName;/*** 描述*/private String bookDesc;public Book(String bookName, String author, Integer number, Float price, Integer bookTypeId, String bookDesc) {super();this.bookName = bookName;this.author = author;this.number = number;this.price = price;this.bookTypeId = bookTypeId;this.bookDesc = bookDesc;}public Book(int id, String bookName, String author, Integer number, Float price, Integer bookTypeId, String bookDesc) {super();this.id = id;this.bookName = bookName;this.author = author;this.number = number;this.price = price;this.bookTypeId = bookTypeId;this.bookDesc = bookDesc;}public Book(String bookName, String author, Integer bookTypeId) {super();this.bookName = bookName;this.author = author;this.bookTypeId = bookTypeId;}public int getId() {return id;}public void setId(int id) {this.id = id;}public String getBookName() {return bookName;}public void setBookName(String bookName) {this.bookName = bookName;}public String getAuthor() {return author;}public void setAuthor(String author) {this.author = author;}public int getNumber() {return number;}public void setNumber(int number) {this.number = number;}public Float getPrice() {return price;}public void setPrice(Float price) {this.price = price;}public Integer getBookTypeId() {return bookTypeId;}public void setBookTypeId(Integer bookTypeId) {this.bookTypeId = bookTypeId;}public String getBookTypeName() {return bookTypeName;}public void setBookTypeName(String bookTypeName) {this.bookTypeName = bookTypeName;}public String getBookDesc() {return bookDesc;}public void setBookDesc(String bookDesc) {this.bookDesc = bookDesc;}public Book() {}public Book(int id,String bookName,String author,Integer number,Float price,Integer bookTypeId,String bookTypeName,String bookDesc) {this.id = id;this.bookName = bookName;this.author = author;this.number = number;this.price = price;this.bookTypeId = bookTypeId;this.bookTypeName = bookTypeName;this.bookDesc = bookDesc;}}

2.BookDao

代码如下(示例):

package dao;import entity.Book;import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;/*** BookManagementSystem** @author PlutoCtx* @version 2024/5/26 9:27* @email ctx195467@163.com* @since JDK17*/public class BookDao {/*** 添加图书* @param connection    连接数据库* @param book  书籍* @return  preparedStatement.executeUpdate(),int* @throws Exception    how do I know*/public int add(Connection connection, Book book)throws Exception{String sql = "INSERT INTO book VALUES (null, ?, ?, ?, ?, ?, ?)";PreparedStatement preparedStatement = connection.prepareStatement(sql);preparedStatement.setString(1, book.getBookName());preparedStatement.setString(2, book.getAuthor());preparedStatement.setInt(3, book.getNumber());preparedStatement.setFloat(4, book.getPrice());preparedStatement.setInt(5, book.getBookTypeId());preparedStatement.setString(6, book.getBookDesc());return preparedStatement.executeUpdate();}/*** 查找书籍* @param connection    连接数据库* @param book  书籍* @return  preparedStatement.executeUpdate(), int* @throws Exception    how do I know*/public ResultSet list(Connection connection, Book book)throws Exception{StringBuilder stringBuffer = new StringBuilder("SELECT * FROM book b,bookType bt WHERE b.bookTypeId = bt.id");if(book.getBookName() != null &&!book.getBookName().equals("")){stringBuffer.append(" and b.bookName like '%").append(book.getBookName()).append("%'");}if(book.getAuthor() != null &&!book.getAuthor().equals("")){stringBuffer.append(" and b.author like '%").append(book.getAuthor()).append("%'");}if(book.getBookTypeId() != null && book.getBookTypeId()!=-1){stringBuffer.append(" and b.bookTypeId=").append(book.getBookTypeId());}PreparedStatement preparedStatement = connection.prepareStatement(stringBuffer.toString());return preparedStatement.executeQuery();}/*** 删除书籍* @param connection    连接数据库* @param id 书籍id号* @return  preparedStatement.executeUpdate(), int* @throws Exception    how do I know*/public int delete(Connection connection,String id)throws Exception{String sql = "DELETE FROM book " +"WHERE id = ?";PreparedStatement preparedStatement = connection.prepareStatement(sql);preparedStatement.setString(1, id);return preparedStatement.executeUpdate();}/*** 更新书籍* @param connection    连接数据库* @param book  书籍* @return  preparedStatement.executeUpdate(),int* @throws Exception    how do I know*/public int update(Connection connection,Book book) throws Exception{String sql = "UPDATE book " +"SET bookName = ?, author = ?, number = ?, price = ?, bookDesc = ?, bookTypeId = ? " +"WHERE id = ?";PreparedStatement preparedStatement = connection.prepareStatement(sql);preparedStatement.setString(1, book.getBookName());preparedStatement.setString(2, book.getAuthor());preparedStatement.setInt(3, book.getNumber());preparedStatement.setFloat(4, book.getPrice());preparedStatement.setString(5, book.getBookDesc());preparedStatement.setInt(6, book.getBookTypeId());preparedStatement.setInt(7, book.getId());return preparedStatement.executeUpdate();}/*** 判断书籍是否存在* @param connection    数据库连接* @param bookTypeId    书类号* @return  存在与否* @throws Exception    异常多了什么都有可能*/public boolean existBookByBookTypeId(Connection connection,String bookTypeId)throws Exception{String sql = "SELECT * FROM book WHERE bookTypeId = ?";PreparedStatement preparedStatement = connection.prepareStatement(sql);preparedStatement.setString(1, bookTypeId);ResultSet rs = preparedStatement.executeQuery();return rs.next();}}

3.DBUtil

package utils;import java.sql.Connection;
import java.sql.DriverManager;/*** BookManagementSystem* 数据库连接** @author PlutoCtx* @version 2024/5/26 8:06* @email ctx195467@163.com* @since JDK17*/public class DBUtil {/**数据库*/private String url = "jdbc:mysql://localhost:3306/BookBorrowingManagementSystem";/*** 用户名*/private String username = "root";/*** 密码*/private String password = "Shangxiao111";/*** 驱动名称*/private String jdbcName = "com.mysql.cj.jdbc.Driver";/*** 获取数据库连接* @return  返回连接* @throws Exception 没连上*/public Connection getConnection() throws Exception{Class.forName(jdbcName);Connection connection = DriverManager.getConnection(url, username, password);return connection;}/*** 关闭数据库连接* @param connection    数据库连接* @throws Exception    异常*/public void closeConnection(Connection connection) throws Exception{if (connection != null){connection.close();}}}

4.BookAddInternalFrame

package view.adminOperation;import dao.BookDao;
import dao.BookTypeDao;
import entity.Book;
import entity.BookType;
import utils.DBUtil;import javax.swing.*;
import javax.swing.border.LineBorder;
import java.awt.event.ActionEvent;
import java.sql.Connection;
import java.sql.ResultSet;
import java.util.Objects;
import java.util.logging.Logger;/*** BookManagementSystem* 图书添加界面** @author PlutoCtx* @version 2024/5/26 9:08* @email ctx195467@163.com* @since JDK17*/public class BookAddInternalFrame extends JInternalFrame {private final JTextField bookNameTxt;private final JTextField authorTxt;private final JTextField bookNumberTxt;private final ButtonGroup buttonGroup = new ButtonGroup();private final JTextField priceTxt;private final JComboBox bookTypeJcb;private final JTextArea bookDescTxt;private final DBUtil dbUtil = new DBUtil();private final BookTypeDao bookTypeDao = new BookTypeDao();private final BookDao bookDao = new BookDao();/*** Create the frame.*/public BookAddInternalFrame() {setClosable(true);setIconifiable(true);setTitle("图书添加");setBounds(100, 100, 450, 467);JLabel label = new JLabel("图书名称:");bookNameTxt = new JTextField();bookNameTxt.setColumns(10);JLabel label1 = new JLabel("图书作者:");authorTxt = new JTextField();authorTxt.setColumns(10);JLabel label2 = new JLabel("图书数量:");bookNumberTxt = new JTextField();bookNumberTxt.setColumns(10);JLabel label3 = new JLabel("图书价格:");priceTxt = new JTextField();priceTxt.setColumns(10);JLabel label4 = new JLabel("图书描述:");bookDescTxt = new JTextArea();JLabel label5 = new JLabel("图书类别:");bookTypeJcb = new JComboBox();JButton button = new JButton("添加");button.addActionListener(this::bookAddActionPerformed);button.setIcon(new ImageIcon(Objects.requireNonNull(BookAddInternalFrame.class.getResource("/add.png"))));JButton button1 = new JButton("重置");button1.addActionListener(this::resetValueActionPerformed);button1.setIcon(new ImageIcon(Objects.requireNonNull(BookAddInternalFrame.class.getResource("/reset.png"))));GroupLayout groupLayout = new GroupLayout(getContentPane());groupLayout.setHorizontalGroup(groupLayout.createParallelGroup(GroupLayout.Alignment.LEADING).addGroup(groupLayout.createSequentialGroup().addGap(42).addGroup(groupLayout.createParallelGroup(GroupLayout.Alignment.LEADING).addGroup(groupLayout.createSequentialGroup().addComponent(button).addPreferredGap(LayoutStyle.ComponentPlacement.UNRELATED).addComponent(button1).addGap(232)).addGroup(groupLayout.createParallelGroup(GroupLayout.Alignment.LEADING).addComponent(label5).addGroup(groupLayout.createSequentialGroup().addGroup(groupLayout.createParallelGroup(GroupLayout.Alignment.TRAILING).addComponent(label4).addComponent(label2).addComponent(label)).addPreferredGap(LayoutStyle.ComponentPlacement.RELATED).addGroup(groupLayout.createParallelGroup(GroupLayout.Alignment.LEADING).addGroup(groupLayout.createSequentialGroup().addGroup(groupLayout.createParallelGroup(GroupLayout.Alignment.LEADING, false).addComponent(bookNameTxt, GroupLayout.PREFERRED_SIZE, 88, GroupLayout.PREFERRED_SIZE).addComponent(bookNumberTxt, GroupLayout.PREFERRED_SIZE, 88, GroupLayout.PREFERRED_SIZE).addComponent(bookTypeJcb, 0, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)).addGap(35).addGroup(groupLayout.createParallelGroup(GroupLayout.Alignment.LEADING, false).addGroup(groupLayout.createSequentialGroup().addComponent(label1).addPreferredGap(LayoutStyle.ComponentPlacement.UNRELATED).addComponent(authorTxt, GroupLayout.PREFERRED_SIZE, 91, GroupLayout.PREFERRED_SIZE)).addGroup(groupLayout.createSequentialGroup().addComponent(label3).addPreferredGap(LayoutStyle.ComponentPlacement.UNRELATED).addComponent(priceTxt)))).addComponent(bookDescTxt)).addContainerGap(44, Short.MAX_VALUE))))));groupLayout.setVerticalGroup(groupLayout.createParallelGroup(GroupLayout.Alignment.LEADING).addGroup(groupLayout.createSequentialGroup().addGap(42).addGroup(groupLayout.createParallelGroup(GroupLayout.Alignment.BASELINE).addComponent(label).addComponent(bookNameTxt, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE).addComponent(label1).addComponent(authorTxt, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)).addGap(29).addGroup(groupLayout.createParallelGroup(GroupLayout.Alignment.BASELINE).addComponent(label2).addComponent(bookNumberTxt).addComponent(label3).addComponent(priceTxt, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)).addGap(33).addGroup(groupLayout.createParallelGroup(GroupLayout.Alignment.BASELINE).addComponent(label5).addComponent(bookTypeJcb, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)).addGap(30).addGroup(groupLayout.createParallelGroup(GroupLayout.Alignment.LEADING).addComponent(label4).addComponent(bookDescTxt, GroupLayout.PREFERRED_SIZE, 137, GroupLayout.PREFERRED_SIZE)).addPreferredGap(LayoutStyle.ComponentPlacement.RELATED, 37, Short.MAX_VALUE).addGroup(groupLayout.createParallelGroup(GroupLayout.Alignment.BASELINE).addComponent(button).addComponent(button1)).addGap(42)));getContentPane().setLayout(groupLayout);/** 设置文本域边框*/bookDescTxt.setBorder(new LineBorder(new java.awt.Color(127,157,185), 1, false));fillBookType();}/*** 重置事件处理* @param e event*/private void resetValueActionPerformed(ActionEvent e) {this.resetValue();}/*** 图书添加事件处理* @param event event*/private void bookAddActionPerformed(ActionEvent event) {String bookName = this.bookNameTxt.getText();String author = this.authorTxt.getText();String price = this.priceTxt.getText();String bookDesc = this.bookDescTxt.getText();if(bookName == null || "".equals(bookName.trim())){JOptionPane.showMessageDialog(null, "图书名称不能为空");return;}if(author == null || "".equals(author.trim())){JOptionPane.showMessageDialog(null, "图书作者不能为空");return;}if(price == null || "".equals(price.trim())){JOptionPane.showMessageDialog(null, "图书价格不能为空");return;}String bookNumber = bookNumberTxt.getText();int numberOfBook = bookNumber.isEmpty() ? 0 : Integer.parseInt(bookNumber);BookType bookType = (BookType) bookTypeJcb.getSelectedItem();int bookTypeId = bookType.getId();Book book = new Book(bookName,author, numberOfBook, Float.parseFloat(price) , bookTypeId,  bookDesc);Connection con = null;try{con = dbUtil.getConnection();int addNum = bookDao.add(con, book);if(addNum == 1){JOptionPane.showMessageDialog(null, "图书添加成功");resetValue();}else{JOptionPane.showMessageDialog(null, "图书添加失败");}}catch(Exception e){e.printStackTrace();JOptionPane.showMessageDialog(null, "图书添加失败");}finally{try {dbUtil.closeConnection(con);} catch (Exception e) {e.printStackTrace();}}}/*** 重置表单*/private void resetValue(){this.bookNameTxt.setText("");this.authorTxt.setText("");this.priceTxt.setText("");this.bookNumberTxt.setText("");this.bookDescTxt.setText("");if(this.bookTypeJcb.getItemCount()>0){this.bookTypeJcb.setSelectedIndex(0);}}/*** 初始化图书类别下拉框*/private void fillBookType(){Connection con = null;BookType bookType = null;try{con = dbUtil.getConnection();ResultSet rs = bookTypeDao.list(con, new BookType());while(rs.next()){bookType = new BookType();bookType.setId(rs.getInt("id"));bookType.setBookTypeName(rs.getString("bookTypeName"));this.bookTypeJcb.addItem(bookType);}}catch(Exception e){e.printStackTrace();}finally{Logger.getGlobal().info("finished!");}}
}

5.Login

package view;import dao.UserDao;
import entity.User;
import utils.DBUtil;import javax.swing.*;
import javax.swing.border.EmptyBorder;
import javax.swing.plaf.FontUIResource;
import java.awt.*;
import java.awt.event.ActionEvent;
import java.sql.Connection;
import java.util.Enumeration;
import java.util.Objects;/*** BookManagementSystem* 登录界面** @author PlutoCtx* @version 2024/5/26 8:17* @email ctx195467@163.com* @since JDK17*/public class Login extends JFrame {private JPanel contentPane;private final JTextField userNameText;private final JPasswordField passwordText;private final DBUtil dbUtil = new DBUtil();private final UserDao userDao = new UserDao();/*** Create the frame*/public Login(){//改变系统默认字体Font font = new Font("Dialog", Font.PLAIN, 12);Enumeration<Object> keys = UIManager.getDefaults().keys();while (keys.hasMoreElements()){Object key = keys.nextElement();Object value = UIManager.get(key);if (value instanceof FontUIResource){UIManager.put(key, font);}}setResizable(false);// 用户登录setTitle("用户登录");setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);setBounds(500,250,450,343);contentPane = new JPanel();contentPane.setBorder(new EmptyBorder(5,5,5,5));setContentPane(contentPane);JLabel lblNewLabel = new JLabel("图书管理系统");lblNewLabel.setFont(new Font("宋体", Font.BOLD, 23));lblNewLabel.setIcon(new ImageIcon(Objects.requireNonNull(getClass().getResource("/logo.png"))));JLabel lblNewLabel1 = new JLabel("用户名:");lblNewLabel1.setIcon(new ImageIcon(Objects.requireNonNull(getClass().getResource("/userName.png"))));JLabel lblNewLabel2 = new JLabel("密  码:");lblNewLabel2.setIcon(new ImageIcon(Objects.requireNonNull(getClass().getResource("/password.png"))));userNameText = new JTextField();userNameText.setColumns(10);passwordText = new JPasswordField();JButton btnNewButton1 = new JButton("登录");btnNewButton1.addActionListener(this::loginActionPerformed);btnNewButton1.setIcon(new ImageIcon(Objects.requireNonNull(getClass().getResource("/login.png"))));JButton btnNewButton2 = new JButton("重置");btnNewButton2.addActionListener(this::resetValueActionPerformed);btnNewButton2.setIcon(new ImageIcon(Objects.requireNonNull(getClass().getResource("/reset.png"))));GroupLayout groupLayoutContentPane = new GroupLayout(contentPane);groupLayoutContentPane.setHorizontalGroup(groupLayoutContentPane.createParallelGroup(GroupLayout.Alignment.LEADING).addGroup(groupLayoutContentPane.createSequentialGroup().addGroup(groupLayoutContentPane.createParallelGroup(GroupLayout.Alignment.LEADING).addGroup(groupLayoutContentPane.createSequentialGroup().addGap(111).addComponent(lblNewLabel)).addGroup(groupLayoutContentPane.createSequentialGroup().addGap(101).addGroup(groupLayoutContentPane.createParallelGroup(GroupLayout.Alignment.LEADING).addComponent(lblNewLabel1).addComponent(lblNewLabel2).addComponent(btnNewButton1)).addGap(32).addGroup(groupLayoutContentPane.createParallelGroup(GroupLayout.Alignment.LEADING).addComponent(btnNewButton2).addGroup(groupLayoutContentPane.createParallelGroup(GroupLayout.Alignment.LEADING, false).addComponent(passwordText).addComponent(userNameText, GroupLayout.DEFAULT_SIZE, 128, Short.MAX_VALUE))))).addContainerGap(111, Short.MAX_VALUE)));groupLayoutContentPane.setVerticalGroup(groupLayoutContentPane.createParallelGroup(GroupLayout.Alignment.LEADING).addGroup(groupLayoutContentPane.createSequentialGroup().addGap(30).addComponent(lblNewLabel).addGap(26).addGroup(groupLayoutContentPane.createParallelGroup(GroupLayout.Alignment.LEADING).addGroup(groupLayoutContentPane.createSequentialGroup().addComponent(lblNewLabel1).addGap(29).addGroup(groupLayoutContentPane.createParallelGroup(GroupLayout.Alignment.BASELINE).addComponent(lblNewLabel2).addComponent(passwordText, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))).addComponent(userNameText, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)).addGap(36).addGroup(groupLayoutContentPane.createParallelGroup(GroupLayout.Alignment.BASELINE).addComponent(btnNewButton1).addComponent(btnNewButton2)).addContainerGap(60, Short.MAX_VALUE)));contentPane.setLayout(groupLayoutContentPane);// 居中this.setLocationRelativeTo(null);}/*** 登录事件处理* @param evt action*/private void loginActionPerformed(ActionEvent evt) {String userName = this.userNameText.getText();String password = new String(this.passwordText.getPassword());if (userName == null || userName.equals("")){JOptionPane.showMessageDialog(null, "用户名不能为空");return;}if (password == null || password.equals("")){JOptionPane.showMessageDialog(null, "密码不能为空");return;}// 调用dao层方法User user = new User(userName, password);Connection con = null;try {con = dbUtil.getConnection();User currentUser = userDao.login(con, user);if (currentUser != null){dispose();if (currentUser.getStatus() == 1) {new AdminMainFrame(currentUser).setVisible(true);JOptionPane.showMessageDialog(null, "登录成功");} else {new UserMainFrame(currentUser).setVisible(true);JOptionPane.showMessageDialog(null, "登录成功");}}else {JOptionPane.showMessageDialog(null, "用户名或密码错误");}} catch (Exception e) {e.printStackTrace();}finally {try {dbUtil.closeConnection(con);}catch (Exception e){e.printStackTrace();}}}/*** 重置事件处理* @param evt action*/private void resetValueActionPerformed(ActionEvent evt){this.userNameText.setText("");this.passwordText.setText("");}}

三、配置

1、idea直接导入解压文件夹
2、打开navicat等数据库可视化软件,运行sql文件夹下的数据库文件
3、修改DBUtil.java中的用户名、连接、密码(如果有必要的话)
4、运行Main

如有购买需求,请移步到 面包多 进行购买,CSDN的收费太黑了

面包多中提供了几种不同的版本代码:

  • JavaSwing+MySQL图书管理系统 有数据库版,提供MySQL支持,数据能够实现增删改查
  • JavaSwing+MySQL图书管理系统 无数据库版,仅提供界面和部分鼠标点击事件,数据内容无法被修改
  • JavaSwing+MySQL图书借阅管理系统 有数据库版,提供MySQL支持,数据能够实现增删改查

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.rhkb.cn/news/332644.html

如若内容造成侵权/违法违规/事实不符,请联系长河编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

ic基础|时钟篇05:芯片中buffer到底是干嘛的?一文带你了解buffer的作用

大家好&#xff0c;我是数字小熊饼干&#xff0c;一个练习时长两年半的ic打工人。我在两年前通过自学跨行社招加入了IC行业。现在我打算将这两年的工作经验和当初面试时最常问的一些问题进行总结&#xff0c;并通过汇总成文章的形式进行输出&#xff0c;相信无论你是在职的还是…

计算机毕业设计 | SpringBoot招投标 任务发布网站(附源码)

1&#xff0c;绪论 在市场范围内&#xff0c;任务发布网站很受欢迎&#xff0c;有很多开发者以及其他领域的牛人&#xff0c;更倾向于选择工作时间、工作场景更自由的零工市场寻求零散单子来补贴家用。 如今市场上&#xff0c;任务发布网站鱼龙混杂&#xff0c;用户需要找一个…

电机转速计算(基于码盘和IO外部中断)

目录 概述 1 硬件介绍 1.1 整体硬件结构 1.2 模块功能介绍 2 测速框架介绍 2.1 测速原理 2.2 软件框架结构 3 使用STM32Cube配置Project 3.1 准备环境 3.2 配置参数 3.3 生成Project 4 功能实现 4.1 电机控制代码 4.2 测试代码 4.3 速度计算 5 测试 5.1 编写测…

搭建CMS系统

搭建CMS系统 1 介绍 内容管理系统&#xff08;Content Management System&#xff0c;CMS&#xff09;是一种用于管理、发布和修改网站内容的系统。开源的CMS系统有WordPress、帝国CMS等&#xff0c;国产的Halo很不错。 WordPress参考地址 # 官网 https://wordpress.org/# …

OrangePi KunPengPro | 开发板开箱测评之学习与使用

OrangePi KunPengPro | 开发板开箱测评之学习与使用 时间&#xff1a;2024年5月23日20:51:12 文章目录 OrangePi KunPengPro | 开发板开箱测评之学习与使用概述1.参考2.资料、工具3.使用3-1.通过串口登录系统3-2.通过SSH登录系统3-3.安装交叉编译工具链3-4.复制文件到设备3-5.第…

SpringMVC:创建一个简单的SpringMVC框架S

目录 一、框架介绍 两个重要的xml文件 SpringMVC执行流程 二、Vscode搭建SpringMVC框架 1、maven创建webapp原型项目 2、pom.xml下添加springmvc的相关依赖 3、在web.xml配置 4、springmvc.xml的配置 5、编写Controller控制器类 6、 编写JSP界面 7、项目结构图 一…

【除自身以外数组的乘积】python

目录 思路&#xff1a; 代码&#xff1a; 思路&#xff1a; 直接计算前缀乘积&#xff0c;后缀乘积&#xff0c;然后相乘即可 开始我还在想&#xff0c;遍历一次i&#xff0c;怎么能同时计算前缀乘积和后缀乘积&#xff0c;事实上分开计算比较方便。。 代码&#xff1a; cl…

基于SpringBoot和Mybatis实现的留言板案例

目录 一、需求及界面展示 二、准备工作 引入依赖 .yml文件相关配置 数据库数据准备 三、编写后端代码 需求分析 代码结构 Model Mapper Service Controller 前端代码 四、测试 一、需求及界面展示 需求&#xff1a; 1. 输入留言信息&#xff0c;点击提交&…

hubilder Android模拟器华为手机连接不上

APP真机测试注意点&#xff1a; 1. 同一个局域网下 2. 手机连接USB模式&#xff08;华为选择USB配置&#xff1a;音频来源&#xff09; &#xff0c;开发者模式 3. 实在不行重启HBuilderX再运行真机 可是卡在了“正在安装手机端HBuilder调试基座...” 就没反应了&#xff1f;&…

Flask+Vue+MySQL天水麻辣烫管理系统设计与实现(附源码 配置 文档)

背景&#xff1a; 同学找到我期望做一个天水麻辣烫的网页&#xff0c;想复用以前做过的课设&#xff0c;结合他的实际需求&#xff0c;让我们来看看这个系统吧~ 项目功能与使用技术概述&#xff1a; 里面嵌入了6个子系统&#xff0c;其中餐饮系统可以进行餐馆信息添加、修改…

Jeecg | 完成配置后,如何启动整个项目?

前端启动步骤&#xff1a; 1. 以管理员身份打开控制台&#xff0c;切换到前端项目目录。 2. 输入 pnpm install 3. 输入 pnpm dev 4. 等待前端成功运行。 可以看到此时前端已经成功启动。 后端启动步骤&#xff1a; 1. 启动 mysql 服务器。 管理员身份打开控制台&#…

微服务-系统架构

微服务&#xff1a; 系统架构的演变 单一应用架构 早期的互联网应用架构&#xff0c;大量应用服务 功能 集中在一个包里&#xff0c;把大量的应用打包为一个jar包&#xff0c;部署在一台服务器&#xff0c;例如tomcat上部署Javaweb项目 缺点:耦合度高&#xff0c;一台服务器…

谷歌浏览器使用vue插件查看表单提交的数据

1.查看组件&#xff1a; 对应代码里主页面引用的组件名&#xff1a; 表单名称&#xff0c;对应组件里form表单名&#xff1a; 左边的层次结构&#xff1a; 右边层次结构&#xff1a;

【vue2配置】Vue Router

Vue Router官网 1、npm install vue-router4 2、创建模块&#xff0c;在src目录小创/views/map/MapIndex.vue模块和创router/index.js文件 3、在router/index.js配置路由 import Vue from "vue"; import Router from "vue-router"; // 引入模块 const Ma…

【限免】杂波环境下线性调频脉冲、巴克码、频率步进脉冲雷达MTI、脉冲压缩【附MATLAB代码】

来源&#xff1a;微信公众号&#xff1a;EW Frontier 本代码主要模拟杂波环境&#xff08;飞机、地杂波、鸟类信号&#xff09;下&#xff0c;Chirp脉冲、巴克码脉冲、频率步进脉冲雷达信号的脉冲压缩及MTI、​匹配滤波。 MATLAB主代码 % 定义参数 fs 1000; % 采样率 T 1; …

基于EV54Y39A PIC-IOT WA的手指数量检测功能开发(MPLAB+ADC)

目录 项目介绍硬件介绍项目设计开发环境及工程参考总体流程图硬件基本配置光照传感器读取定时器检测逻辑 功能展示项目总结 &#x1f449; 【Funpack3-2】基于EV54Y39A PIC-IOT WA的手指数量检测功能开发 &#x1f449; Github: EmbeddedCamerata/PIC-IOT_finger_recognition 项…

C++ prime 第五版 第14章 重载运算与类型转换

一、基本概念 重载的运算符是具有特殊名字的函数&#xff1a;它们的名字由关键字operator和其后要定义的运算符号共同组成。和其他函数一样&#xff0c;重载的运算符也包含返回类型、参数列表以及函数体。 我们不能为内置类型的运算对象重定义运算符。对于一个运算符函数来说&…

【Linux】 虚拟机可以ping通主机 主机却ping不通虚拟机 解决方法

我当时初学linux&#xff0c;需要虚拟机联网&#xff0c;且虚拟机和windows需要能相互ping通&#xff0c;我当时就是虚拟机一切正常&#xff0c;虚拟机显示有网可以ping通百度&#xff0c;也可以ping通windows&#xff0c;但是windows就是ping不通虚拟机&#xff0c;这个问题困…

如何关闭或者减少屏蔽 CloudFlare 的真人检测

经常浏览境外网站的应该常碰到一个真人检测的提示(如下图所示)。最近,明月就收到了一个知乎上的付费咨询:问我如何去掉这个提示,由此明月也特别的研究了一下这个“真人检测”,这算是 CloudFlare 的一个特色了,基本上大家看到站点访问有这个提示的几乎都是用了 CloudFlar…

list的模拟实现(一)

嗨喽大家好&#xff0c;时隔许久阿鑫又给大家带来了新的博客&#xff0c;list的模拟实现&#xff08;一&#xff09;&#xff0c;下面让我们开始今天的学习吧&#xff01; list的模拟实现&#xff08;一&#xff09; 1.list splice接口的使用 2.list尾插的实现 3.list的迭代…