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
96
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.3k
Cluster AutoscalerをTerraformとHelmfileでデプロイしてPrometheusでモニタリングする / Deploy the Cluster Autoscaler with Terraform and Helmfile, Monitor with Prometheus
int128
3
1.7k
認証の仕組みとclient-go credential plugin / authentication and client-go credential plugin
int128
7
7.4k
CLIでOAuth/OIDCを快適に利用する
int128
0
850
AppEngine × Spring Boot × Kotlin
int128
0
110
いつものJIRA設定
int128
1
180
Swaggerのテンプレートを魔改造した話 / Customize Swagger Templates
int128
1
4.8k
本番環境のリリースを自動化した話
int128
0
750
The Evolution of System Architecture
int128
0
170
Other Decks in Technology
See All in Technology
Simplify! 10 ways to reduce complexity in software development
ufried
2
250
Tailwind CSS の小話「コンテナークエリーって便利」
yamaday
0
110
Google Cloud Next 2025 Recap 生成AIモデルとマーケティングでのコンテンツ生成 / Generative AI models and content creation in marketing
kyou3
0
180
AIとSREで「今」できること
honmarkhunt
3
720
Cursorを全エンジニアに配布 その先に見据えるAI駆動開発の未来 / 2025-05-13-forkwell-ai-study-1-cursor-at-loglass
itohiro73
2
500
製造業向けIoTソリューション提案資料.pdf
haruki_uiru
0
250
newmo の創業を支える Software Architecture と Platform Engineering
110y
5
490
MCPを理解する
yudai00
14
10k
激動の一年を通じて見えてきた「技術でリードする」ということ
ktr_0731
1
570
Datadog のトライアルを成功に導く技術 / Techniques for a successful Datadog trial
nulabinc
PRO
0
140
雑に疎通確認だけしたい...せや!CloudShell使ったろ!
alchemy1115
0
220
Part1 GitHubってなんだろう?その2
tomokusaba
2
750
Featured
See All Featured
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
47
2.7k
Practical Orchestrator
shlominoach
187
11k
Git: the NoSQL Database
bkeepers
PRO
430
65k
How to Ace a Technical Interview
jacobian
276
23k
A Tale of Four Properties
chriscoyier
159
23k
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
5
570
The Cult of Friendly URLs
andyhume
78
6.3k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
179
53k
It's Worth the Effort
3n
184
28k
Designing Experiences People Love
moore
142
24k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
227
22k
What's in a price? How to price your products and services
michaelherold
245
12k
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がリリースされたのはいつ?