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
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Hidetake Iwata
November 18, 2016
Technology
140
0
Share
Swagger × Spring Cloud
Spring Day 2016 Lightning Talk
http://springday2016.springframework.jp
Hidetake Iwata
November 18, 2016
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.9k
認証の仕組みとclient-go credential plugin / authentication and client-go credential plugin
int128
7
7.9k
CLIでOAuth/OIDCを快適に利用する
int128
0
1k
AppEngine × Spring Boot × Kotlin
int128
0
170
いつものJIRA設定
int128
1
240
Swaggerのテンプレートを魔改造した話 / Customize Swagger Templates
int128
1
5k
本番環境のリリースを自動化した話
int128
0
840
The Evolution of System Architecture
int128
0
230
Other Decks in Technology
See All in Technology
React、まだ楽しくて草
uhyo
2
210
インフラが苦手でも大丈夫! 紙芝居 Kubernetes -WWGT 10周年編-
aoi1
1
310
エンジニアは生成AIと どのように向き合うべきか? ことばの意味という観点から
verypluming
3
300
Oracle AI Database@AWS:サービス概要のご紹介
oracle4engineer
PRO
4
2.7k
Sony_KMP_Journey_KotlinConf2026
sony
0
180
Spring Boot における AOT Cache 活用テクニックと 起動時間改善事例
ntt_dsol_java
0
180
Anthropic AIネイティブ・スタートアップ構築のプレイブック を理解する
nagatsu
0
230
Cloud Run のアップデート 触ってみる&紹介
gre212
0
250
なぜハノーバーメッセに行くべきなのか 〜初参加だから語れること〜
tanakaseiya
0
180
組織の中で自分を経営する技術
shoota
0
230
「使われるデータ基盤」を目指してデータアナリストとワークショップをやった話
jackojacko_
2
940
A Harness for Behaviour: how to get AI to generate code that does what we intend, or "TDD in the age of AI"
xpmatteo
1
520
Featured
See All Featured
Six Lessons from altMBA
skipperchong
29
4.3k
WCS-LA-2024
lcolladotor
0
610
Building an army of robots
kneath
306
46k
Building Flexible Design Systems
yeseniaperezcruz
330
40k
A designer walks into a library…
pauljervisheath
211
24k
Paper Plane (Part 1)
katiecoart
PRO
0
8.1k
Typedesign – Prime Four
hannesfritz
42
3.1k
Keith and Marios Guide to Fast Websites
keithpitt
413
23k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
162
16k
How to audit for AI Accessibility on your Front & Back End
davetheseo
0
390
Raft: Consensus for Rubyists
vanstee
141
7.5k
Skip the Path - Find Your Career Trail
mkilby
1
130
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がリリースされたのはいつ?