$ show 201206030/novel-plus
This is a multi-module Spring Boot application for a Chinese-language novel reading and publishing platform (原创文学CMS). It comprises four interconnected modules: novel-admin (back-office management with Layui/Shiro RBAC), novel-front (user-facing reader/author portal with JWT auth), novel-crawl (automated content ingestion from external novel sites), and novel-common (shared entities, mappers, utilities). The system provides full CRUD for books, chapters, comments, users, and payments; templated front-end themes (blue, green, orange, dark); Alipay/WeChat integration; AI-assisted writing via Spring AI (SiliconFlow); and a MyBatis-based data layer with Sharding-JDBC for sharding. While functionally rich and actively maintained, the codebase suffers from significant static asset duplication, mixed javax/jakarta imports, and multiple legacy third-party front-end libraries bundled directly.
The LLM identified 4 files worth highlighting for reuse:
A servlet Filter that wraps HttpServletRequest with XssHttpServletRequestWrapper to sanitize cross-site scripting (XSS) and SQL injection characters from request parameters. Demonstrates a reusable security pattern for web applications; can be extracted with only the wrapper class and servlet API dependency.
A pure utility class that converts a flat list of Tree nodes (id, parentId relationship) into a nested tree structure using recursion. Generic enough to build menu trees, department hierarchies, or category trees in any Java project with minimal adaptation.
A Snowflake-like distributed unique ID generator with configurable machine ID, timestamp offset, and sequence. Self-contained and easily extracted as a library for any system requiring ordered, unique, 64-bit IDs across multiple nodes.
A whitelist-based validator for dynamic sort/order columns to prevent SQL injection. Accepts a map of allowed columns and validates input against it. Decoupled from any ORM and can be reused in any Java application that performs dynamic sorting.