diff --git a/README.en.md b/README.en.md new file mode 100644 index 0000000000000000000000000000000000000000..0e2ab775f4d576a389fe414b6cf9fba9d084781b --- /dev/null +++ b/README.en.md @@ -0,0 +1,59 @@ +This project is a desktop application based on Java Swing, integrating the MyBatis framework to implement a bank management system. Key functionalities include user login, registration, deposit, withdrawal, transfer, balance inquiry, password modification, and more. The system adopts the MVC architecture and includes complete front-end and back-end logic. + +## Functional Modules + +- **User Management**: Login, registration, password change, password reset, account deletion. +- **Bank Card Management**: Balance inquiry, card loss reporting, fund transfer, deposit, withdrawal. +- **Log Recording**: Records user operation logs. +- **Interface Interaction**: Uses Java Swing to build a graphical interface, providing a good user experience. + +## Technology Stack + +- **Java Swing**: Used to build the graphical user interface (GUI). +- **MyBatis**: Used for database operations and data persistence. +- **MySQL**: As the backend database for storing user, bank card, log, and other information. +- **Maven**: Project dependency management tool. +- **JDBC**: Used to establish a connection with the database. +- **Annotations and Dynamic Proxy**: Used to implement transaction management and decoupling of the service layer. + +## Project Structure Description + +- **`com.cjh.APP`**: Program entry point, the main startup class. +- **`com.cjh.Service`**: Business interface definitions. +- **`com.cjh.Service.impl`**: Implementation of business logic. +- **`com.cjh.mapper`**: MyBatis Mapper interfaces for database operations. +- **`com.cjh.pojo`**: Entity classes corresponding to database tables. +- **`com.cjh.utils`**: Utility classes, such as MyBatis utilities, Mapper factory, Service factory, etc. +- **`com.cjh.view`**: Java Swing interface classes responsible for user interaction. + +## Usage Instructions + +1. **Environment Preparation** + - JDK 1.8 or higher + - Maven + - MySQL database + - IDE (such as IntelliJ IDEA) + +2. **Database Configuration** + - Configure database connection information in `src/main/resources/db.properties`. + - Create the corresponding database and table structure (SQL scripts need to be written manually). + +3. **Running the Project** + - Build the project using Maven: `mvn clean install` + - Run `com.cjh.APP` to start the program. + - After the program starts, the login interface will be displayed, allowing users to perform login, registration, and other operations. + +4. **Function Demonstration** + - After successful login, users will enter different main interfaces based on their roles (regular user or administrator). + - Regular users can perform operations such as deposit, withdrawal, fund transfer, balance inquiry, and password modification. + - Administrators can perform user management, card loss reporting, and other operations. + +## Notes + +- Please ensure the database service is running and the database connection information in the configuration file is correct. +- The project uses MyBatis dynamic proxy mechanism; ensure that Mapper interfaces match SQL statements in XML files. +- The Java Swing interface uses custom styles and event listeners to ensure smooth user interaction. + +## License + +This project uses the MIT License. For details, please refer to the LICENSE file. \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000000000000000000000000000000000000..09bca9c32f1c62f8b65682dcb8575d2fd028fce6 --- /dev/null +++ b/README.md @@ -0,0 +1,59 @@ +该项目是一个基于Java Swing的桌面应用程序,结合了MyBatis框架实现银行管理系统。主要功能包括用户登录、注册、存款、取款、转账、查询余额、修改密码等。系统采用MVC架构,包含完整的前后端逻辑。 + +## 功能模块 + +- **用户管理**:登录、注册、修改密码、重置密码、删除账户。 +- **银行卡管理**:查询余额、挂失银行卡、转账、存款、取款。 +- **日志记录**:记录用户的操作日志。 +- **界面交互**:使用Java Swing构建图形化界面,提供良好的用户体验。 + +## 技术栈 + +- **Java Swing**:用于构建图形用户界面(GUI)。 +- **MyBatis**:用于数据库操作,实现数据持久化。 +- **MySQL**:作为后端数据库存储用户、银行卡、日志等信息。 +- **Maven**:项目依赖管理工具。 +- **JDBC**:用于与数据库建立连接。 +- **注解与动态代理**:实现事务管理和服务层的解耦。 + +## 项目结构说明 + +- **`com.cjh.APP`**:程序入口,启动主类。 +- **`com.cjh.Service`**:定义业务接口。 +- **`com.cjh.Service.impl`**:实现业务逻辑。 +- **`com.cjh.mapper`**:MyBatis的Mapper接口,用于数据库操作。 +- **`com.cjh.pojo`**:实体类,对应数据库表。 +- **`com.cjh.utils`**:工具类,如MyBatis工具、Mapper工厂、Service工厂等。 +- **`com.cjh.view`**:Java Swing界面类,负责用户交互。 + +## 使用说明 + +1. **环境准备** + - JDK 1.8 或更高版本 + - Maven + - MySQL 数据库 + - IDE(如 IntelliJ IDEA) + +2. **数据库配置** + - 在`src/main/resources/db.properties`中配置数据库连接信息。 + - 创建相应的数据库和表结构(需自行编写SQL脚本)。 + +3. **运行项目** + - 使用Maven构建项目:`mvn clean install` + - 运行`com.cjh.APP`启动程序。 + - 程序启动后,将显示登录界面,用户可以进行登录、注册等操作。 + +4. **功能演示** + - 登录成功后,根据用户角色(普通用户或管理员)进入不同的主界面。 + - 普通用户可以进行存款、取款、转账、查询余额、修改密码等操作。 + - 管理员可以进行用户管理、挂失银行卡等操作。 + +## 注意事项 + +- 请确保数据库服务已启动,并且配置文件中的数据库连接信息正确。 +- 项目中使用了MyBatis的动态代理机制,确保Mapper接口与XML文件中的SQL语句匹配。 +- Java Swing界面使用了自定义样式和事件监听器,确保界面交互流畅。 + +## 许可证 + +本项目采用 MIT 许可证。详情请参阅 LICENSE 文件。 \ No newline at end of file