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
multiple-databases-demo
Search
Yuta Endo
November 22, 2017
Programming
0
440
multiple-databases-demo
Yuta Endo
November 22, 2017
Tweet
Share
More Decks by Yuta Endo
See All by Yuta Endo
LINE_Platform_-_UI_UX勉強会__02_-_Chat_Bot編資料.pdf
manzen
0
330
Other Decks in Programming
See All in Programming
Jetpack for KMP
fornewid
1
290
Composing an API the *right* way (Droidcon Berlin 2024)
zsmb
1
450
The rollercoaster of releasing an Android, iOS, and macOS app with Kotlin Multiplatform | droidcon Berlin
prof18
0
110
Folding Cheat Sheet #7
philipschwarz
PRO
0
150
社内 LT 会を発足し、アウトプット文化を醸成させるために考えたこと・やったこと / Starting internal LT meetings and fostering an output culture
mackey0225
3
120
SRE チーム立ち上げ前に考えたこと・取り組んだこと / Considerations and Preparations Before Establishing an SRE Team
mackey0225
3
320
Polarsの成長: v0.14からv1.0までの変遷と今後の展望
zerebom
1
350
さきがけから振り返るアーキテクチャ刷新 / Reflecting on the Architectural Renewal from the Vanguard
nrslib
2
770
実用的かつリーズナブルな 「Azure × Gemini × LINE」~キャラクターBot 実装ライブデモ~
tomodo_ysys
1
170
リハビリmruby
kishima
1
160
SDCon2024: Enabling DevOps and Team Topologies thru architecture: architecting for fast flow
cer
PRO
0
780
Findy - エンジニア向け会社紹介 / Findy Letter for Engineers
findyinc
2
81k
Featured
See All Featured
How STYLIGHT went responsive
nonsquared
93
5k
Building Your Own Lightsaber
phodgson
101
5.9k
Why You Should Never Use an ORM
jnunemaker
PRO
51
8.9k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
35
6.3k
Teambox: Starting and Learning
jrom
130
8.6k
A better future with KSS
kneath
231
17k
Fantastic passwords and where to find them - at NoRuKo
philnash
42
2.7k
Art, The Web, and Tiny UX
lynnandtonic
291
20k
No one is an island. Learnings from fostering a developers community.
thoeni
17
2.8k
Web Components: a chance to create the future
zenorocha
307
41k
In The Pink: A Labor of Love
frogandcode
139
22k
Design by the Numbers
sachag
277
18k
Transcript
KotlinとSpring Bootで 複数データベースを扱う Rest APIを作ってみた 2017/11/22 #m3kt どこでもKotlin #4 秋のLT大会
のらねこワークス株式会社 遠藤 @ENZEN0129
自己紹介 氏名:遠藤 友太 Twitter:@ENZEN0129 所属:のらねこワークス株式会社 エンジニア 得意:java ruby kotlin php
node angular react js aws … etc その他活動 • http://www.ittan.website/ • https://qiita.com/enzen • http://www.enzen.net/
今日のテーマ Kotlin x spring bootでマルチデータベースアクセス!!
環境
ディレクトリ構成
処理イメージ Controller Service Service Repository Repository
APIのイメージ Controller Service Service Repository Repository
Controller
Controller
Controller
None
Controller
None
最高やでKotlinたん
ちなみにJavaで書くとこんな感じ
None
None
APIのイメージ Controller Service Service Repository Repository
User Service
External User Info Service
APIのイメージ Controller Service Service Repository Repository
Repository
model
Primary Configuration
Configuration
Secondary Configuration
Configuration
Spring bootでできたしSpring batchでも Kotlin x spring batchでマルチデータベースアクセス!!
None
なんで?
None
None
誰か僕に教えてよ
None
こんなになるまでいろいろ 試したんだ
None
誰か僕を助けてよ!
None
None
None
Spring bootでできたしSpring batchでも。。。 あれ? Kotlin x spring batchでマルチデータベースアクセス!!
結果 Kotlin x spring boot x spring bootで マルチデータベースアクセス!!
最後に サンプルコードをGithubにあげています。 https://github.com/manzen/multiple-databases-demo