# 云图库 **Repository Path**: qianlonghai/cloud-library ## Basic Information - **Project Name**: 云图库 - **Description**: 云图库项目 - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2025-09-24 - **Last Updated**: 2025-10-12 ## Categories & Tags **Categories**: Uncategorized **Tags**: Java ## README # YuPictureBackend A backend service project based on Spring Boot, providing functionalities such as user management, access control, and health checks, suitable as backend support for image management applications. ## Project Overview YuPictureBackend is a Java backend project built with the Spring Boot framework. It integrates technology stacks such as MyBatis Plus, Swagger, and JWT, implementing core features including user registration, login, permission control, and user information management. The project has a clear structure and is suitable for learning purposes or as a backend template for enterprise-level applications. ### Key Features - User registration and login - User permission management (administrator and regular user) - User information management (CRUD operations) - Health check interface - Global exception handling - Pagination query support ### Technology Stack - Java 17 - Spring Boot - MyBatis Plus - Swagger UI - JWT (for permission control) - Redis (optional, for caching) - MySQL ## Project Structure ``` src/ ├── main/ │ ├── java/ │ │ └── com.yupi.yupicturebackend/ │ │ ├── annotation/ # Custom annotations │ │ ├── aop/ # Permission interceptors │ │ ├── common/ # Common classes (e.g., response wrappers, utility classes) │ │ ├── config/ # Configuration classes (e.g., CORS, MyBatis configuration) │ │ ├── controller/ # Controller classes (REST APIs) │ │ ├── exception/ # Exception handling classes │ │ ├── mapper/ # Database operation interfaces │ │ ├── model/ # Data models, DTOs, VO │ │ ├── service/ # Business logic interfaces and implementations │ │ └── YuPictureBackendApplication.java # Startup class │ ├── resources/ │ │ ├── application.yml # Configuration file │ │ ├── generator/ # MyBatis generator configuration │ │ └── static/ # Static resource files ├── test/ │ └── java/ # Unit tests ``` ## Quick Start ### Environment Requirements - JDK 17 - Maven 3.8+ - MySQL 8.0+ - Redis (optional) ### Installation Steps 1. Clone the project: ```bash git clone https://gitee.com/qianlonghai/cloud-library.git cd cloud-library ``` 2. Create the database and import the SQL file: ```bash mysql -u root -p < sql/create_table.sql ``` 3. Modify the configuration file: Update the database connection information in `src/main/resources/application.yml`. 4. Start the project: ```bash mvn spring-boot:run ``` 5. Access the API documentation: Visit: `http://localhost:8080/swagger-ui.html` after starting the application. ## Usage Instructions ### User Registration ```http POST /user/register { "userAccount": "testuser", "userPassword": "123456", "checkPassword": "123456" } ``` ### User Login ```http POST /user/login { "userAccount": "testuser", "userPassword": "123456" } ``` ### Get Current Logged-in User Information ```http GET /user/get/login ``` ### Administrator Gets User Information ```http GET /user/get?id=1 ``` ### User Logout ```http POST /user/logout ``` ### Delete User (Administrator Privilege) ```http POST /user/delete { "id": 1 } ``` ## API Documentation The project integrates Swagger. Visit `http://localhost:8080/swagger-ui.html` to view the complete API documentation. ## Exception Handling The project uses `@RestControllerAdvice` to handle exceptions uniformly, returning error messages in a consistent format, for example: ```json { "code": 4001, "message": "User not logged in", "data": null } ``` ## Contribution Guide Contributions are welcome! Please follow these steps: 1. Fork the project 2. Create a new branch (`git checkout -b feature/new-feature`) 3. Commit your changes (`git commit -am 'Add some feature'`) 4. Push the branch (`git push origin feature/new-feature`) 5. Create a Pull Request ## License This project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details. --- For further assistance, please refer to the `Tips` directory in the project or consult the code comments.