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
Java User Group - Spring Boot Admin
Search
Johannes Edmeier
September 05, 2018
Programming
0
240
Java User Group - Spring Boot Admin
Johannes Edmeier
September 05, 2018
Tweet
Share
More Decks by Johannes Edmeier
See All by Johannes Edmeier
Spring IO 2018 - Monitoring Spring Boot Applications with Spring Boot Admin
joshiste
2
3.1k
Other Decks in Programming
See All in Programming
11年かかって やっとVibe Codingに 時代が追いつきましたね
yimajo
1
260
DynamoDBは怖くない!〜テーブル設計の勘所とテスト戦略〜
hyamazaki
0
200
QA x AIエコシステム段階構築作戦
osu
0
260
CLI ツールを Go ライブラリ として再実装する理由 / Why reimplement a CLI tool as a Go library
ktr_0731
3
1k
Vibe Codingの幻想を超えて-生成AIを現場で使えるようにするまでの泥臭い話.ai
fumiyakume
21
10k
プロダクトという一杯を作る - プロダクトチームが味の責任を持つまでの煮込み奮闘記
hiliteeternal
0
450
中級グラフィックス入門~効率的なメッシュレット描画~
projectasura
4
2.6k
Webinar: AI-Powered Development: Transformiere deinen Workflow mit Coding Tools und MCP Servern
danielsogl
0
110
Scale out your Claude Code ~自社専用Agentで10xする開発プロセス~
yukukotani
9
1.9k
ZeroETLで始めるDynamoDBとS3の連携
afooooil
0
160
あのころの iPod を どうにか再生させたい
orumin
2
2.4k
可変性を制する設計: 構造と振る舞いから考える概念モデリングとその実装
a_suenami
10
1.7k
Featured
See All Featured
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
8
880
jQuery: Nuts, Bolts and Bling
dougneiner
63
7.8k
The Straight Up "How To Draw Better" Workshop
denniskardys
235
140k
How To Stay Up To Date on Web Technology
chriscoyier
790
250k
The Pragmatic Product Professional
lauravandoore
36
6.8k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
PRO
183
54k
The Cost Of JavaScript in 2023
addyosmani
51
8.8k
Unsuck your backbone
ammeep
671
58k
Mobile First: as difficult as doing things right
swwweet
223
9.9k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
26
3k
GraphQLの誤解/rethinking-graphql
sonatard
71
11k
Keith and Marios Guide to Fast Websites
keithpitt
411
22k
Transcript
Spring Boot Admin 1 Johannes Edmeier @joshiste
2
Setting things up (demo time) 3
4 Setting up the SBA Server (1) 1. Generate web
project using Spring Initializr $ curl https://start.spring.io/starter.tgz \ -d dependencies=web,\ codecentric-spring-boot-admin-client,\ codecentric-spring-boot-admin-server \ | tar -xzvf -
5 Setting up the SBA Server (2) @EnableAdminServer @SpringBootApplication public
class AdminServerApplication { ... } 2. Import Configuration to the Application
6 Register client applications (1) <dependency> <groupId>de.codecentric</groupId> <artifactId>spring-boot-admin-starter-client</artifactId> <version>2.0.3</version> </dependency>
1. Add dependency
7 Register client applications (2) spring.boot.admin.client.url=http://localhost:8081 management.endpoints.web.exposure.include=* management.endpoint.health.show-details=always 2. Configure
SBA Server localtion and expose endpoints
8 Easy client tweaks spring.application.name=spring-petclinic logging.file=target/petclinic.log info.sources=https://github.com/spring-projects/spring-petclinic <plugin> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-maven-plugin</artifactId>
<executions> <execution> <goals> <goal>build-info</goal> </goals> </execution> </executions> </plugin>
9 alternatively use Eureka, Consul, Zookeeper, static config … or
any other Spring Cloud Discovery Client Register client applications
Behind the Scenes 10
11 SBA Client SBA Server client registers periodically via http
post
12 SBA Client SBA Server server polls health endpoint via
http … monitoring non-Boot applications is possible (just health checking)
13 Notifications HipChat eMail … or implement your own …
simply configured via properties
14 SBA Client server forwards requests to clients (using zuul)
SBA UI SBA Server … clients must expose actuator endpoints using http
15 … can be implemented using Spring Security e.g. Basic
Auth, JWT, session based, … … custom headers can be injected implementing a HttpHeadersProvider Security
16 Customization – HttpHeadersProvider @Bean public HttpHeadersProvider injectHeaders() { return
instance -> { HttpHeaders headers = new HttpHeaders() headers.set("X-CUSTOM", "1234567"); return headers; }; }
17 Customization - InstanceExchangeFilterFunction @Bean public InstanceExchangeFilterFunction auditLog() { return
(instance, request, next) -> { if (HttpMethod.POST.equals(request.method())) { log.info("{} for {} on {}", request.method(), instance.getId(), request.url()); } return next.exchange(request); }; }
18 Customization - Notifier @Bean public Notifier loggerNotifier() { return
event -> { log.info("Event {}", event.toString()); return Mono.empty(); }; }
19 Webflux Support Sessions Endpoint Support Mapping Endpoint Support Scheduled
Tasks Endpoint Support Out of the Box Cloudfoundry Support Html-Templates for Mail-Notifications Version is also looked up in Metadata Wallboard View Runs on Java 10 New Features in 2.0
20 Bugfixes… Bugfixes… Bugfixes… Support for Cache Endpoint (2.1.x) Multi-Instances-Actions
(e.g. Setting Loglevels) . . . What to Expect in the Future
21 Questions? [spring-boot-admin] codecentric/spring-boot-admin GITTER codecentric/spring-boot-admin