How jkxyx205/sharp-project works
The overall project is a multi-module Java “suite” of libraries and applications that together offer a range of reusable components for tasks such as database operations, Excel processing, file upload, custom form handling, reporting, meta (dictionary/KV) management, mail, SMS, and more. In essence, it is a composite project that demonstrates how to build modular, auto-configurable Java components (using Spring Boot auto‐configuration and Maven as the build system) that can be selectively used either independently or in an integrated application (for example, via the “sharp-admin” or “sharp-demo” modules).
Main components
• Modules/libraries – Each “sharp-…” folder (e.g., sharp-database, sharp-excel, sharp-meta, sharp-fileupload, sharp-formflow, sharp-report, sharp-sms, sharp-mail, etc.) is a distinct component. These modules provide specialised services:
– sharp-database: A lightweight persistence/query tool based on JdbcTemplate (and compatible with MyBatis and JPA) that supports MySQL and Oracle.
– sharp-excel: A module for reading/writing Excel files using Apache POI.
– sharp-meta: Handles dictionary and key–value property management.
– sharp-fileupload: A JAX-RS–style file upload solution with support for local storage, FastDFS, and OSS.
– sharp-formflow: A customizable, user-defined form framework (with support for various form controls such as text, multi-select, date, file, etc.).
– sharp-report: A reporting and query tool designed to create report query models.
– Other modules (sharp-admin, sharp-demo, sharp-common, sharp-generator, etc.) serve either as examples, administrative interfaces, or support libraries.
Relationships and interactions
• The core libraries (sharp-common, sharp-database, sharp-meta, etc.) form the foundation and are used by higher-level modules. For example:
– sharp-admin and sharp-demo rely on the common library for shared utilities and automatically configured Spring Boot components.
– The auto-configuration files (spring.factories) in most modules indicate that these modules use Spring Boot’s auto-configuration mechanism. Represent an “Auto-Configuration” layer that scans these modules.
• That the presentation components (web controllers in sharp-admin, sharp-demo) trigger business logic provided by specialized modules – for instance, when a user uploads a file, the request is routed through sharp-fileupload’s RESTful APIs, then it interacts with the storage abstraction (local/FastDFS/OSS) implemented within that module.
• Similarly, for Excel operations, there is an interaction from the service/controller layers (possibly in demo or admin modules) to the sharp-excel module.
Architectural patterns and design principles
• Modularity: Each feature is encapsulated in its own Maven module, which makes the design highly modular. Emphasize this by drawing each module as an individual component.
• Auto-Configuration and Dependency Injection: Most modules are Spring Boot–based (evidenced by spring.factories files and auto-configuration classes). Represent that each module contributes beans that are automatically integrated.
• Separation of concerns: Notice that data access (sharp-database), presentation (sharp-admin, sharp-demo), file operations (sharp-fileupload) and business logic (sharp-formflow, sharp-report) are clearly separated.
Relevant technologies, frameworks, or libraries
• Spring Boot – underpinning most modules via auto-configuration.
• Maven – for dependency management and module coordination.
• Apache POI – for Excel handling in sharp-excel.
• JdbcTemplate (and optionally MyBatis) – for database operations in sharp-database.
• Third-party integrations (OSS, FastDFS) – in the sharp-fileupload module.
• Various validation, security, and web libraries used in sharp-admin and sharp-demo.