# springboot3-bucket **Repository Path**: make-mm/springboot3-bucket ## Basic Information - **Project Name**: springboot3-bucket - **Description**: springboot3 日常使用到的功能汇总 - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2025-12-09 - **Last Updated**: 2025-12-09 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # SpringBoot3 Security Authentication Project ## Project Overview This is a security authentication project based on Spring Boot 3, providing foundational functionalities for authentication, permission control, and user management. The project is divided into two modules: - `base-website`: The basic website module, containing authentication, user management, task management, and notification features - `springboot-security`: The security module, providing a complete authentication framework and permission control system ## Main Features - JWT token authentication - Role-Based Access Control (RBAC) - User login/logout - API permission control - Pagination query functionality - Unified exception handling - Redis cache integration - OpenAPI documentation support ## Technology Stack - Spring Boot 3 - Spring Security - JWT - MyBatis Plus - Redis - OpenAPI 3 - Knife4j - MySQL ## Module Description ### base-website Module Provides basic website functionalities, including: - User authentication (login/logout) - User management - Task management - Notification system - Security configuration - Unified response format ### springboot-security Module Provides a complete security framework, including: - JWT token management - Permission verification service - User details service - Security filter chain - Role and permission management - Security context utilities ## Quick Start ### Environment Requirements - Java 17 or higher - Maven 3.5+ - MySQL 5.7+ - Redis 6.0+ ### Installation Steps 1. Clone the project ```bash git clone https://gitee.com/make-mm/springboot3-bucket.git ``` 2. Create the database and import the SQL file ```bash mysql -u your_username -p your_database < base-website/sql.mysql/task_flow.sql ``` 3. Modify the configuration file ```yaml # Edit base-website/src/main/resources/application.yml spring: datasource: url: jdbc:mysql://localhost:3306/your_database username: your_username password: your_password ``` 4. Start the project ```bash mvn clean install mvn spring-boot:run ``` ## API Documentation Access the API documentation at: ``` http://localhost:8080/swagger-ui/index.html ``` ## Security Configuration The project uses JWT for authentication. Configuration options in the configuration file include: - Token expiration time - Refresh token expiration time - Secret key - Support for multiple concurrent logins ## Permission Control Use the `@PreAuthorize` annotation for method-level permission control: ```java @PreAuthorize("@ss.hasPerm('sys:user:query')") ``` Permission information is automatically loaded from Redis cache. ## User Management Provides the following user management features: - Paginated user list - User detail query - Create new user - Update user information - Delete user ## Exception Handling Unified exception handling mechanism supporting: - Business exceptions - Parameter validation exceptions - SQL exceptions - JWT authentication exceptions ## Extension Suggestions You can extend this project by: - Adding more business modules - Integrating SMS/email services - Adding audit logging functionality - Implementing multi-tenancy support - Adding OAuth2 support ## Contribution Guidelines Contributions are welcome. Please follow these steps: 1. Fork the project 2. Create a new branch 3. Commit your changes 4. Submit a Pull Request ## License This project is licensed under the MIT License. See the LICENSE file for details.