Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Swagger × Spring Cloud
Search
Hidetake Iwata
November 18, 2016
Technology
0
130
Swagger × Spring Cloud
Spring Day 2016 Lightning Talk
http://springday2016.springframework.jp
Hidetake Iwata
November 18, 2016
Tweet
Share
More Decks by Hidetake Iwata
See All by Hidetake Iwata
Rewrite Go error handling using AST transformation
int128
1
1.4k
Cluster AutoscalerをTerraformとHelmfileでデプロイしてPrometheusでモニタリングする / Deploy the Cluster Autoscaler with Terraform and Helmfile, Monitor with Prometheus
int128
3
1.8k
認証の仕組みとclient-go credential plugin / authentication and client-go credential plugin
int128
7
7.8k
CLIでOAuth/OIDCを快適に利用する
int128
0
980
AppEngine × Spring Boot × Kotlin
int128
0
160
いつものJIRA設定
int128
1
220
Swaggerのテンプレートを魔改造した話 / Customize Swagger Templates
int128
1
4.9k
本番環境のリリースを自動化した話
int128
0
830
The Evolution of System Architecture
int128
0
220
Other Decks in Technology
See All in Technology
S3はフラットである –AWS公式SDKにも存在した、 署名付きURLにおけるパストラバーサル脆弱性– / JAWS DAYS 2026
flatt_security
0
1.7k
類似画像検索モデルの開発ノウハウ
lycorptech_jp
PRO
5
1.1k
SRE NEXT 2026 CfP レビュアーが語る聞きたくなるプロポーザルとは?
yutakawasaki0911
1
250
生成AIの利用とセキュリティ /gen-ai-and-security
mizutani
1
1.6k
マルチアカウント環境でSecurity Hubの運用!導入の苦労とポイント / JAWS DAYS 2026
genda
0
500
Google系サービスで文字起こしから勝手にカレンダーを埋めるエージェントを作った話
risatube
0
140
Claude Code 2026年 最新アップデート
oikon48
10
8.2k
Go標準パッケージのI/O処理をながめる
matumoto
0
140
ランサムウエア対策してますか?やられた時の対策は本当にできてますか?AWSでのリスク分析と対応フローの泥臭いお話。
hootaki
0
110
Evolution of Claude Code & How to use features
oikon48
1
590
OpenClawで回す組織運営
jacopen
3
690
OCHaCafe S11 #2 コンテナ時代の次の一手:Wasm 最前線
oracle4engineer
PRO
1
110
Featured
See All Featured
State of Search Keynote: SEO is Dead Long Live SEO
ryanjones
0
150
How to build an LLM SEO readiness audit: a practical framework
nmsamuel
1
670
Marketing Yourself as an Engineer | Alaka | Gurzu
gurzu
0
150
Why Mistakes Are the Best Teachers: Turning Failure into a Pathway for Growth
auna
0
78
[RailsConf 2023] Rails as a piece of cake
palkan
59
6.4k
Building Flexible Design Systems
yeseniaperezcruz
330
40k
The AI Search Optimization Roadmap by Aleyda Solis
aleyda
1
5.4k
職位にかかわらず全員がリーダーシップを発揮するチーム作り / Building a team where everyone can demonstrate leadership regardless of position
madoxten
61
52k
New Earth Scene 8
popppiees
1
1.7k
Measuring Dark Social's Impact On Conversion and Attribution
stephenakadiri
1
150
Designing for Timeless Needs
cassininazir
0
160
Leadership Guide Workshop - DevTernity 2021
reverentgeek
1
240
Transcript
Swagger × Spring Cloud @int128 (Hidetake Iwata)
None
Open API Specification / Swagger REST APIの仕様をJSONやYAMLで記述できる。 ツールセットが提供されている。 • Swagger
Editor(エディタ) • Swagger UI(APIコンソール) • Swagger Codegen(コード自動生成)
Swagger Codegen Swagger YAMLからいろんな言語のソースコードを自動生成する ツール。JARで提供されている。 • Java • Node.js •
PHP • などなど ※逆に、アノテーションからAPI仕様を生成する方法もある
Swagger Codegen × Spring 以下のテンプレートを選択できる: 1. spring-mvc ◦ APIサーバのControllerとModelが自動生成される ◦
Spring MVC 2. spring-cloud ◦ APIクライアントのClientとModelが自動生成される ◦ Spring Cloud Feign
自動生成コードの取り扱い 自動生成されたコードは変更しない。 JARに切り出して、ビルドツールで依存関係を張る。 地獄のパターン: • 自動生成されたコードをいじる(ControllerやModel) • API仕様が変わる • コードに変更を取り込む?
自動生成コード: • Controllerクラス ◦ ServiceクラスをDIしてメソッド実行 ◦ テンプレートをカスタマイズ • Modelクラス 実装コード:
• Serviceクラス:ビジネスロジックを実装 自動生成コードと実装コードをDIで分離
Gradle Swagger Generator Plugin Swagger YAMLからソースコードやドキュメントを生成 https://github.com/int128/gradle-swagger-generator-plugin
None
None
None
Thank you
2002年 2003年 2004年 2005年 Spring 1.0がリリースされたのはいつ?