https://github.com/timeless-residents/handson-spring-framework-render
A Spring Boot demo application showcasing RESTful API development with Book management functionality
https://github.com/timeless-residents/handson-spring-framework-render
docker java maven openapi rest-api spring-boot swagger-ui
Last synced: 3 months ago
JSON representation
A Spring Boot demo application showcasing RESTful API development with Book management functionality
- Host: GitHub
- URL: https://github.com/timeless-residents/handson-spring-framework-render
- Owner: timeless-residents
- Created: 2025-02-14T06:27:11.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-02-14T06:57:00.000Z (about 1 year ago)
- Last Synced: 2025-04-09T09:50:18.298Z (12 months ago)
- Topics: docker, java, maven, openapi, rest-api, spring-boot, swagger-ui
- Language: Java
- Homepage: https://handson-spring-framework-render.onrender.com
- Size: 15.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Spring Boot デモアプリケーション
このプロジェクトは、Spring Bootを使用した基本的なRESTful APIのデモンストレーションです。
## 開発環境要件
- Java 17以上
- Maven 3.6以上
- Spring Boot 3.x
## セットアップ手順
1. リポジトリをクローンします:
```bash
git clone [リポジトリURL]
```
2. プロジェクトディレクトリに移動:
```bash
cd handson-spring-framework-render
```
3. アプリケーションを実行:
```bash
./mvnw spring-boot:run
```
アプリケーションは `http://localhost:8080` で起動します。
## API エンドポイント
### Hello エンドポイント
- GET `/api/hello` - 基本的な挨拶メッセージを返します
### Book エンドポイント
- GET `/api/books` - すべての本のリストを取得
- GET `/api/books/{id}` - 指定されたIDの本を取得
- POST `/api/books` - 新しい本を追加
- PUT `/api/books/{id}` - 既存の本を更新
- DELETE `/api/books/{id}` - 指定されたIDの本を削除
## API ドキュメント
アプリケーション起動後、以下のURLでSwagger UIを通じてAPIドキュメントにアクセスできます:
```
http://localhost:8080/swagger-ui.html
```
## プロジェクト構造
```
src/
├── main/
│ ├── java/
│ │ └── com/example/demo/
│ │ ├── controller/ - APIエンドポイントの制御
│ │ ├── entity/ - データモデル
│ │ ├── repository/ - データアクセス層
│ │ └── config/ - アプリケーション設定
│ └── resources/
│ ├── application.properties - アプリケーション設定
│ └── application.yml - 追加設定
```
## デプロイメント
このアプリケーションはDockerを使用してコンテナ化できます。Dockerfileが含まれています。
ビルドとデプロイ:
```bash
docker build -t spring-demo .
docker run -p 8080:8080 spring-demo
```
## ライセンス
このプロジェクトはMITライセンスの下で公開されています。