# 安卓自动打包微服务版 **Repository Path**: Marthkoper/android-package ## Basic Information - **Project Name**: 安卓自动打包微服务版 - **Description**: 可以将网页打包成安卓项目 - **Primary Language**: Unknown - **License**: Apache-2.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2025-10-09 - **Last Updated**: 2025-10-09 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # Android Package Project Documentation ## Project Overview This project is a microservice system based on Spring Boot and MyBatis Plus, focusing on Android application information management, data point tracking, and web application configuration. The system contains multiple modules, covering complete functionalities ranging from client interface definitions to server-side business logic, data persistence, message queue listening, and scheduled tasks. Main modules include: - `android-client`: Feign client interface definitions - `android-common`: Core data models and common classes - `android-service-10040`: Main business service module - `basic-common`: Basic utilities such as exception handling, assertions, and log filtering - `schedule-service-10100`: Scheduled cleanup tasks - `entrance-service-10030`: Gateway service and global filters ## Features - Android application information upload and query - Data point tracking and management - Kafka message listening and processing - Automated QR code and signature file generation - Email notification mechanism - File upload functionality - Scheduled cleanup of expired folders - Global request logging and rate limiting control ## Technology Stack - Spring Boot 2.x - MyBatis Plus - Feign Client - Kafka message queue - Redis cache - Java Mail Sender - Swagger UI - Nacos configuration center - Spring Cloud Gateway ## Installation and Deployment ### Environment Requirements - JDK 1.8+ - Maven 3.5+ - MySQL 5.7+ - Kafka 2.0+ - Redis 3.0+ - Nacos 1.4+ ### Build Steps 1. Clone the project ```bash git clone https://gitee.com/Martinkeep/android-package.git ``` 2. Initialize the database Import `sql/webadmin.sql` into the MySQL database 3. Configure Nacos Import configuration files from `nacos/nacos_config_export_*.zip` 4. Build the project ```bash cd android-package mvn clean install ``` 5. Start services - Start the gateway service: `support/entrance-service-10030` - Start the Android main service: `android/android-service-10040` - Start the scheduled task service: `common/schedule-service-10100` ## Usage Instructions ### Android Information Management #### Upload Android Information POST `/Upload_A_info` ```json { "packageName": "com.example.app", "appName": "Example App", "url": "http://example.com/app.apk", "iconName": "app_icon.png", "code": "v1.0.0" } ``` #### Query Android Information GET `/get_A_info?uuid=xxx` ### Data Point Management Automatically process data point information through Kafka message queues ### Generate Signature File GET `/generate?userId=123` ## System Architecture ``` +---------------------+ | Android Client | +----------+----------+ | v +---------------------+ | Gateway Service | | (Entrance-10030) | +----------+----------+ | v +---------------------+ | Android Service | | (android-service- | | 10040) | +----------+----------+ | +------+------+ | | +----v----+ +----v----+ | Kafka | | MySQL | | Queue | | DB | +---------+ +---------+ ``` ## Configuration Instructions Main configuration files: - `android-service-10040/src/main/resources/application.yml` - `entrance-service-10030/src/main/resources/application.yml` Key configuration items: ```yaml server: port: 10040 spring: datasource: url: jdbc:mysql://localhost:3306/android_db username: root password: root kafka: bootstrap-servers: localhost:9092 mail: host: smtp.example.com port: 587 username: user@example.com password: yourpassword file: upload-path: /var/www/uploads ``` ## Log Monitoring - Log file location: `android-service-10040/logs/` - Monitoring metrics: Health checks and metric monitoring provided by Spring Boot Actuator ## Security Mechanism - JWT authentication - Interface rate limiting (`@Limit` annotation) - Request logging (`@Log` annotation) - Global exception handling ## Extension Guide ### Add a New Interface 1. Add a new interface method in `AndroidInfoController` 2. Define the interface in `IAndroidInfoService` 3. Implement the business logic in `AndroidInfoServiceImpl` 4. Update the database mapping file (if needed) ### Add New Message Handling 1. Add a new `@KafkaListener` method in `SimpleListener` 2. Implement the message processing logic 3. Add corresponding business service calls ## Frequently Asked Questions Q: Database connection failure when starting? A: Check the database configuration in `application.yml`, confirm that the MySQL service is running Q: File upload failed? A: Check if the directory specified by `file.upload-path` exists and has write permissions Q: Kafka messages cannot be consumed? A: Confirm that the Kafka service is running normally and check the consumer group configuration Q: Unable to generate QR code? A: Confirm that there are available font files on the server and check the image generation path permissions ## Contribution Guide We welcome code contributions! Please follow these steps: 1. Fork the project 2. Create a new branch 3. Submit code changes 4. Create a Pull Request Please ensure: - Maintain consistent code style - Add necessary comments - Update relevant documentation - Pass all test cases ## License This project uses the Apache-2.0 license. For details, please refer to the LICENSE file.