multi pom

This commit is contained in:
2026-06-17 07:11:57 +02:00
parent 1f4a1667c3
commit f48cdf080a
59 changed files with 3622 additions and 296 deletions

View File

@@ -1,34 +1,38 @@
# Spring State Machine Explorer
```shell
brew install graphviz
Static analysis tool to extract and visualize Spring State Machines with deep code traceability.
## Core Modules
- **`state_machine_exporter`**: Java AST analyzer. Scans source code, resolves local Maven/Gradle dependencies, and extracts logic (Lambdas, Actions, Guards) into JSON/PUML.
- **`state_machine_exporter_html`**: Generates an interactive HTML portal with SVG diagrams and rich tooltips.
## Usage
### 1. Extract Metadata (JSON)
```bash
./gradlew :state_machine_exporter:run --args="-i ./my-project -o ./out -f json"
```
```shell
dot -Tpng statemachine.dot -o statemachine.png
### 2. Generate Interactive Portal (HTML)
```bash
./gradlew :state_machine_exporter_html:run --args="-i ./my-project -o ./out_html"
```
*Supports `--profiles prod` to resolve Spring property placeholders.*
## Business Flows
Define sequence of events in `src/main/resources/flows.json`:
```json
[
{
"name": "Order Success",
"description": "Happy path for order placement",
"steps": ["PAY", "CHECK_AVAILABILITY->PENDING", "SHIP"]
}
]
```
```shell
brew install plantuml
```
```shell
plantuml statemachine.puml
plantuml -tsvg statemachine.puml
```
Possible formats
```shell
-teps To generate images using EPS format
-thtml To generate HTML file for class diagram
-tlatex:nopreamble To generate images using LaTeX/Tikz format without preamble
-tlatex To generate images using LaTeX/Tikz format
-tpdf To generate images using PDF format
-tpng To generate images using PNG format (default)
-tscxml To generate SCXML file for state diagram
-tsvg To generate images using SVG format
-ttxt To generate images with ASCII art
-tutxt To generate images with ASCII art using Unicode characters
-tvdx To generate images using VDX format
-txmi To generate XMI file for class diagram
```
plantuml statemachine.scxml
## JSON Structure
- `metadata.entryPoints`: REST, WebFlux, and JMS entry points.
- `metadata.callChains`: Trace from API call to machine trigger (`sendEvent`).
- `transitions.actions[].internalLogic`: Extracted source code/lambdas.
- `metadata.properties`: Dictionary of all detected Spring profiles.