PassJava MiniApp: Cloud Development and Advanced Versions for Interview Question Practice
This article introduces the PassJava open‑source interview‑question mini‑program, explains its cloud‑development and advanced Spring Cloud microservice versions, details deployment steps, database setup, code snippets, and provides links to the GitHub repositories and documentation.
1. Origin
The PassJava open‑source project is an interview‑question platform whose backend uses Spring Cloud microservices and offers a WeChat mini‑program for quick question browsing and practice.
2. Cloud Development Version
2.1 Mini‑program Overview
The cloud‑development mini‑program leverages WeChat Cloud services, allowing developers to build without managing servers, using cloud database, storage, cloud functions, and cloud hosting.
2.1.1 Advantages
No server setup required; use platform capabilities directly.
No need to manage certificates or keys; native WeChat API ensures security.
Shared environment supports multiple mini‑programs, public accounts, and web pages.
Supports any language/framework; containerized deployment to cloud.
Pay‑as‑you‑go scaling based on traffic.
2.1.2 Features
Cloud Database : Document‑type, reliable, callable from mini‑programs and cloud functions.
Storage : Cloud file storage with CDN acceleration, direct front‑end upload/download.
Cloud Functions : Server‑side code execution with built‑in authentication.
Cloud Hosting : Container hosting for any framework/language, always running.
2.1.3 Drawbacks
Best suited for personal projects.
Traffic‑based billing may require purchase for high usage.
Cannot use external middleware such as Redis or RabbitMQ.
Database and storage are limited to Tencent services (no MySQL, Alibaba Cloud, etc.).
2.2 Mini‑program Usage
2.2.1 Question Bank
The question bank displays categories (12 types) and lists, e.g., Spring interview questions, with details loaded from markdown files stored in cloud storage.
2.2.2 Uploading Questions
Upload markdown files (question + answer) to cloud storage, then insert corresponding records into the cloud database. Example record:
{
"_id": "27a98c6c-0477-4edb-8ef3-e35f0501b31c",
"question": "1.JAVA 异常分类及处理?",
"answer": "cloud://test-0jlva.7465-test-0jlva-1254012214/markdown/02_JavaBasic/一、JAVA 异常分类及处理.md",
"number": "1",
"subTitle": "每天进步一点点",
"type": "javaBasic",
"level": "1"
}Fields include question, answer, number, subTitle, type (e.g., javaBasic, jvm, spring), and level.
2.3 Mini‑program Principle
The flow: call custom cloud functions to fetch question lists and markdown paths, download files via system cloud function, save locally, read into cache, convert markdown to renderable elements with towxml , and add image preview events.
3. Advanced Version
The advanced version replaces cloud services with a Spring Cloud microservice backend and MySQL database; the REST API is partially integrated with the mini‑program.
3.1 Prerequisites
Local microservices (passjava‑gateway, passjava‑question, renren) running.
MySQL database and tables created (5 modules, 7 tables).
Nacos service discovery configured.
Passjava‑portal console accessible at http://localhost:8001/ .
Question management functions working (create types and questions).
4. Open‑source Repository
All code (backend, frontend, mini‑program) is hosted on GitHub and Gitee:
Github : https://github.com/Jackson0714/PassJava-Platform Gitee : https://gitee.com/jayh2018/PassJava-Platform Tutorial : www.passjava.cn
Additional resources include the WeChat Cloud Getting Started guide and the PassJava website.
Wukong Talks Architecture
Explaining distributed systems and architecture through stories. Author of the "JVM Performance Tuning in Practice" column, open-source author of "Spring Cloud in Practice PassJava", and independently developed a PMP practice quiz mini-program.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.