You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/docs/commands/dev.md
+193-7Lines changed: 193 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -27,12 +27,51 @@ The `dev` command provides a unified interface for common development tasks. It
27
27
|`build`|`b`, `compile`| Build the project |
28
28
|`test`|`t`| Run tests |
29
29
|`clean`| - | Clean build artifacts |
30
+
|`restart`| - | Trigger restart of running dev server |
30
31
31
32
---
32
33
33
34
## haft dev serve
34
35
35
-
Start the Spring Boot application with DevTools for hot-reload.
36
+
Start the Spring Boot application in **supervisor mode** with interactive restart support.
37
+
38
+
### Interactive Mode (Default)
39
+
40
+
When running in a terminal, `haft dev serve` runs as a supervisor that manages your Spring Boot process. You can use keyboard commands to control the server:
41
+
42
+
| Key | Action |
43
+
|-----|--------|
44
+
|`r`|**Restart** - Compiles first, then restarts (keeps old server if compile fails) |
45
+
|`q`|**Quit** - Gracefully stops the server and exits |
46
+
|`c`|**Clear** - Clears the screen |
47
+
|`h`|**Help** - Shows available commands |
48
+
|`Ctrl+C`| Same as `q` - Graceful shutdown |
49
+
50
+
```
51
+
╭─────────────────────────────────────────╮
52
+
│ Haft Dev Server │
53
+
│ Press r to restart, q to quit │
54
+
│ Press h for more commands │
55
+
╰─────────────────────────────────────────╯
56
+
57
+
INFO Starting application build-tool=Maven
58
+
59
+
. ____ _ __ _ _
60
+
/\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \
61
+
...
62
+
```
63
+
64
+
### Restart Behavior
65
+
66
+
The restart command (`r`) follows a **compile-first** strategy:
0 commit comments