Skip to content

Commit 878be96

Browse files
committed
docs: 문법 및 설명 오류 수정, 한국어 버전 문서 추가
1 parent 7ff30f4 commit 878be96

10 files changed

Lines changed: 1362 additions & 512 deletions

File tree

website/docs/architecture/ioc-container.md

Lines changed: 320 additions & 156 deletions
Large diffs are not rendered by default.

website/docs/overview/configuration.md

Lines changed: 9 additions & 130 deletions
Original file line numberDiff line numberDiff line change
@@ -99,111 +99,21 @@ sprout:
9999
url: jdbc:mysql://localhost:3306/myapp
100100
username: myuser
101101
password: mypassword
102-
driver-class-name: com.mysql.cj.jdbc.Driver # Optional, auto-detected
103-
104-
# Connection pool settings (HikariCP)
105-
hikari:
106-
maximum-pool-size: 20
107-
minimum-idle: 5
108-
connection-timeout: 30000
109-
idle-timeout: 600000
110-
max-lifetime: 1800000
111-
```
112-
113-
## Security Configuration
114-
115-
### Basic Security
116-
```yaml
117-
sprout:
118-
security:
119-
enabled: true
120-
default-role: USER
121-
admin-role: ADMIN
122-
```
123-
124-
### JWT Configuration
125-
```yaml
126-
sprout:
127-
security:
128-
jwt:
129-
secret: your-very-long-secret-key-here
130-
expiration: 86400 # 24 hours
131-
header: Authorization
132-
prefix: "Bearer "
133102
```
134103

135104
### CORS Configuration
136105
```yaml
137-
sprout:
138-
security:
139-
cors:
140-
allowed-origins:
141-
- "http://localhost:3000"
142-
- "https://myapp.com"
143-
allowed-methods:
144-
- GET
145-
- POST
146-
- PUT
147-
- DELETE
148-
allowed-headers:
149-
- Content-Type
150-
- Authorization
151-
allow-credentials: true
152-
```
153-
154-
## WebSocket Configuration
155-
156-
```yaml
157-
sprout:
158-
websocket:
159-
enabled: true
160-
path-prefix: "/ws"
161-
max-frame-size: 65536 # 64KB
162-
ping-interval: 30000 # 30 seconds
106+
cors:
107+
allow-origin: "*"
108+
allow-credentials: true
109+
allow-methods: "GET, POST, PUT, DELETE, OPTIONS"
110+
allow-headers: "Content-Type, Authorization"
111+
expose-headers: ""
112+
max-age: 3600
163113
```
164-
165-
## Environment-Specific Configuration
166-
167-
### Development
168-
```yaml
169-
# application-dev.yml
170-
server:
171-
execution-mode: blocking # Easier debugging
172-
173-
logging:
174-
level: DEBUG
175-
176-
sprout:
177-
database:
178-
url: jdbc:h2:mem:testdb
179-
username: sa
180-
password:
181-
```
182-
183-
### Production
184-
```yaml
185-
# application-prod.yml
186-
server:
187-
execution-mode: nio
188-
thread-type: virtual
189-
190-
logging:
191-
level: INFO
192-
193-
sprout:
194-
database:
195-
url: ${DATABASE_URL}
196-
username: ${DATABASE_USERNAME}
197-
password: ${DATABASE_PASSWORD}
198-
199-
security:
200-
jwt:
201-
secret: ${JWT_SECRET}
202-
```
203-
204114
## Accessing Configuration in Code
205115

206-
Use `AppConfig` to access configuration values:
116+
Use `AppConfig` to access configuration values.
207117

208118
```java
209119
@Component
@@ -231,35 +141,4 @@ Sprout validates configuration at startup and provides helpful error messages:
231141
server:
232142
execution-mode: invalid-mode # Error: Unknown execution mode
233143
thread-pool-size: -1 # Error: Pool size must be positive
234-
```
235-
236-
## Environment Variables
237-
238-
Override any configuration using environment variables:
239-
240-
```bash
241-
# Override database URL
242-
export SPROUT_DATABASE_URL="jdbc:postgresql://localhost:5432/myapp"
243-
244-
# Override server mode
245-
export SPROUT_SERVER_EXECUTION_MODE="nio"
246-
247-
# Override JWT secret
248-
export SPROUT_SECURITY_JWT_SECRET="my-production-secret"
249-
```
250-
251-
Environment variable naming follows the pattern: `SPROUT_` + uppercase path with underscores.
252-
253-
## Configuration Profiles
254-
255-
Load different configurations based on the active profile:
256-
257-
```bash
258-
# Run with development profile
259-
java -Dsprout.profiles.active=dev -jar app.jar
260-
261-
# Run with production profile
262-
java -Dsprout.profiles.active=prod -jar app.jar
263-
```
264-
265-
This loads `application-{profile}.yml` in addition to the base `application.yml`.
144+
```

website/docs/overview/intro.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@ Sprout is a comprehensive web framework that implements the core concepts of mod
88

99
**Educational Purpose**: Understanding how frameworks like Spring work internally by building similar functionality from scratch.
1010

11-
**Production Ready**: Despite its educational origins, Sprout includes production-grade features like NIO servers, comprehensive testing (575 tests, 85% line coverage), and security systems.
12-
1311
**Focused Scope**: Intentionally focused on container/AOP/web/server internals. A full ORM is out of scope for v1.0 to keep the surface area manageable and the code easy to audit.
1412

1513
## Key Features

website/docs/overview/quickstart.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -141,10 +141,6 @@ curl -X POST http://localhost:8080/api/users \
141141
## What's Next?
142142
143143
- 🏗️ [Learn the Architecture](../architecture/ioc-container) - Understand how Sprout works
144-
- 🌐 [Build a Web App](../guides/building-web-app) - Step-by-step guide to building real applications
145-
- 🔌 [WebSocket Chat](../guides/websocket-chat) - Real-time communication example
146-
- 🔒 [Security Setup](../guides/security-setup) - Add authentication and authorization
147-
- ⚙️ [Configuration Reference](../reference/configuration) - All configuration options
148144
149145
## Having Issues?
150146

0 commit comments

Comments
 (0)