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
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.8k
認証の仕組みとclient-go credential plugin / authentication and client-go credential plugin
int128
7
7.9k
CLIでOAuth/OIDCを快適に利用する
int128
0
990
AppEngine × Spring Boot × Kotlin
int128
0
160
いつものJIRA設定
int128
1
230
Swaggerのテンプレートを魔改造した話 / Customize Swagger Templates
int128
1
5k
本番環境のリリースを自動化した話
int128
0
840
The Evolution of System Architecture
int128
0
220
Other Decks in Technology
See All in Technology
"うちにはまだ早い"は本当? ─ 小さく始めるPlatform Engineering入門
harukasakihara
4
420
SREの仕事は「壊さないこと」ではなくなった 〜自律化していくシステムに、責任と判断を与えるという価値〜 / 20260515 Naoki Shimada
shift_evolve
PRO
1
100
Sociotechnical Architecture Reviews: Understanding Teams, not just Artefacts
ewolff
1
160
Digital Independence: Why, When and How
wannesrams
0
310
毎日の作業を Claude Code 経由にしたら、 ノウハウがコードになった
kossykinto
1
1.2k
サービスの信頼性を高めるため、形骸化した「プロダクションミーティング」を立て直すまでの取り組み
stefafafan
1
260
Agent の「自由」と「安全」〜未来に向けて今できること〜
katayan
0
350
PdM・Eng・QAで進めるAI駆動開発の現在地/aidd-with-pdm-eng-qa
shota_kusaba
0
150
2026-05-14 要件定義からソース管理まで!IBM Bob基礎ハンズオン
yutanonaka
0
120
AIが盛んな時代に 技術記事を書き始めて起きた私の中での小さな変化
peintangos
0
370
そのSLO 99.9%、本当に必要ですか? 〜優先度付きSLOによる責任共有の設計思想〜 / Is that 99.9% SLO really necessary? Design philosophy of shared responsibility through prioritized SLOs
vtryo
0
460
ServiceによるKubernetes通信制御ーClusterIPを例に
miku01
1
160
Featured
See All Featured
Keith and Marios Guide to Fast Websites
keithpitt
413
23k
Utilizing Notion as your number one productivity tool
mfonobong
4
300
Exploring the relationship between traditional SERPs and Gen AI search
raygrieselhuber
PRO
2
3.9k
The browser strikes back
jonoalderson
0
1k
SERP Conf. Vienna - Web Accessibility: Optimizing for Inclusivity and SEO
sarafernandez
2
1.4k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
46
2.8k
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
659
62k
Building the Perfect Custom Keyboard
takai
2
750
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
35
2.4k
世界の人気アプリ100個を分析して見えたペイウォール設計の心得
akihiro_kokubo
PRO
70
39k
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
16
1.9k
Introduction to Domain-Driven Design and Collaborative software design
baasie
1
780
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がリリースされたのはいつ?