https://github.com/negi524/spring-webflux-sample
https://github.com/negi524/spring-webflux-sample
gradle spring spring-boot webflux
Last synced: 3 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/negi524/spring-webflux-sample
- Owner: negi524
- Created: 2021-01-29T12:48:51.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2024-03-09T09:22:16.000Z (about 1 year ago)
- Last Synced: 2024-03-09T16:54:07.239Z (about 1 year ago)
- Topics: gradle, spring, spring-boot, webflux
- Language: Java
- Homepage: http://localhost:8080/webjars/swagger-ui/index.html
- Size: 95.7 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# spring-webflux-sample
## 起動方法
### 通常の起動
```bash
./gradlew bootRun
```### プロファイル指定で起動
```bash
./gradlew bootRun --args='--spring.profiles.active=local'
```もしくは、環境変数に以下を設定
```fish
set -x SPRING_PROFILES_ACTIVE local
```
or
```bash
export SPRING_PROFILES_ACTIVE=local
```## 動作確認
### ヘルスチェック
```bash
$ curl -XGET "http://localhost:8080/actuator/health"
{"status":"UP"}
```### メトリクス表示
```bash
$ curl -XGET "http://localhost:8080/actuator/prometheus"
```### サンプル
```bash
$ curl -XGET "http://localhost:8080/v1/sample"
{"key":"value"}
```### Swagger
http://localhost:8080/webjars/swagger-ui/index.html
http://localhost:8080/v3/api-docs### 静的コンテンツ
http://localhost:8080/sample.json