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
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Yuta Endo
November 22, 2017
Programming
0
530
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
380
Other Decks in Programming
See All in Programming
AIと一緒にレガシーに向き合ってみた
nyafunta9858
0
170
CSC307 Lecture 06
javiergs
PRO
0
680
Grafana:建立系統全知視角的捷徑
blueswen
0
320
dchart: charts from deck markup
ajstarks
3
990
AgentCoreとHuman in the Loop
har1101
5
220
Unicodeどうしてる? PHPから見たUnicode対応と他言語での対応についてのお伺い
youkidearitai
PRO
1
1.1k
Vibe Coding - AI 驅動的軟體開發
mickyp100
0
170
CSC307 Lecture 09
javiergs
PRO
1
830
AI & Enginnering
codelynx
0
110
例外処理とどう使い分ける?Result型を使ったエラー設計 #burikaigi
kajitack
16
6k
Lambda のコードストレージ容量に気をつけましょう
tattwan718
0
110
Oxlint JS plugins
kazupon
1
680
Featured
See All Featured
Building the Perfect Custom Keyboard
takai
2
680
Reality Check: Gamification 10 Years Later
codingconduct
0
2k
Building a Scalable Design System with Sketch
lauravandoore
463
34k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
32
2.8k
VelocityConf: Rendering Performance Case Studies
addyosmani
333
24k
The Art of Programming - Codeland 2020
erikaheidi
57
14k
コードの90%をAIが書く世界で何が待っているのか / What awaits us in a world where 90% of the code is written by AI
rkaga
60
42k
The World Runs on Bad Software
bkeepers
PRO
72
12k
A better future with KSS
kneath
240
18k
How To Speak Unicorn (iThemes Webinar)
marktimemedia
1
380
Deep Space Network (abreviated)
tonyrice
0
45
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
2.7k
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