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
510
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
370
Other Decks in Programming
See All in Programming
詳解!defer panic recover のしくみ / Understanding defer, panic, and recover
convto
0
240
AI時代のUIはどこへ行く?
yusukebe
18
8.8k
知っているようで知らない"rails new"の世界 / The World of "rails new" You Think You Know but Don't
luccafort
PRO
1
110
Kiroの仕様駆動開発から見えてきたAIコーディングとの正しい付き合い方
clshinji
1
210
さようなら Date。 ようこそTemporal! 3年間先行利用して得られた知見の共有
8beeeaaat
3
1.4k
「待たせ上手」なスケルトンスクリーン、 そのUXの裏側
teamlab
PRO
0
500
個人軟體時代
ethanhuang13
0
320
MCPで実現するAIエージェント駆動のNext.jsアプリデバッグ手法
nyatinte
7
1.1k
旅行プランAIエージェント開発の裏側
ippo012
2
890
RDoc meets YARD
okuramasafumi
4
170
Rancher と Terraform
fufuhu
2
240
Ruby×iOSアプリ開発 ~共に歩んだエコシステムの物語~
temoki
0
270
Featured
See All Featured
Measuring & Analyzing Core Web Vitals
bluesmoon
9
580
Building a Modern Day E-commerce SEO Strategy
aleyda
43
7.6k
The MySQL Ecosystem @ GitHub 2015
samlambert
251
13k
Testing 201, or: Great Expectations
jmmastey
45
7.7k
Learning to Love Humans: Emotional Interface Design
aarron
273
40k
Build your cross-platform service in a week with App Engine
jlugia
231
18k
GraphQLの誤解/rethinking-graphql
sonatard
72
11k
KATA
mclloyd
32
14k
How to Ace a Technical Interview
jacobian
279
23k
GraphQLとの向き合い方2022年版
quramy
49
14k
Building a Scalable Design System with Sketch
lauravandoore
462
33k
Context Engineering - Making Every Token Count
addyosmani
1
37
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