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
Spring Boot quickstart
Search
Jonas Hecht
August 30, 2016
Technology
0
32
Spring Boot quickstart
Spring Boot design principles and features incl. a hands on demo with Apache CXF
Jonas Hecht
August 30, 2016
Tweet
Share
Other Decks in Technology
See All in Technology
2026年はチャンキングを極める!
shibuiwilliam
9
1.9k
生成AI時代にこそ求められるSRE / SRE for Gen AI era
ymotongpoo
5
2.6k
M&A 後の統合をどう進めるか ─ ナレッジワーク × Poetics が実践した組織とシステムの融合
kworkdev
PRO
1
400
AzureでのIaC - Bicep? Terraform? それ早く言ってよ会議
torumakabe
1
230
顧客の言葉を、そのまま信じない勇気
yamatai1212
1
330
Bill One急成長の舞台裏 開発組織が直面した失敗と教訓
sansantech
PRO
1
280
CDKで始めるTypeScript開発のススメ
tsukuboshi
1
310
GSIが複数キー対応したことで、俺達はいったい何が嬉しいのか?
smt7174
3
140
マーケットプレイス版Oracle WebCenter Content For OCI
oracle4engineer
PRO
5
1.5k
広告の効果検証を題材にした因果推論の精度検証について
zozotech
PRO
0
100
変化するコーディングエージェントとの現実的な付き合い方 〜Cursor安定択説と、ツールに依存しない「資産」〜
empitsu
4
1.3k
usermode linux without MMU - fosdem2026 kernel devroom
thehajime
0
210
Featured
See All Featured
Bash Introduction
62gerente
615
210k
Utilizing Notion as your number one productivity tool
mfonobong
2
210
The SEO identity crisis: Don't let AI make you average
varn
0
64
A designer walks into a library…
pauljervisheath
210
24k
Reality Check: Gamification 10 Years Later
codingconduct
0
2k
How To Speak Unicorn (iThemes Webinar)
marktimemedia
1
380
The AI Search Optimization Roadmap by Aleyda Solis
aleyda
1
5.2k
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.6k
Sam Torres - BigQuery for SEOs
techseoconnect
PRO
0
180
コードの90%をAIが書く世界で何が待っているのか / What awaits us in a world where 90% of the code is written by AI
rkaga
60
42k
Collaborative Software Design: How to facilitate domain modelling decisions
baasie
0
130
Understanding Cognitive Biases in Performance Measurement
bluesmoon
32
2.8k
Transcript
Spring Boot quickstart …with a little bit of Apache CXF
Jonas Hecht
2 About me Jonas Hecht, Senior IT-Consultant https://blog.codecentric.de/ author/jonas-hecht/
[email protected]
@jonashackt github.com/jonashackt
3 I know Spring. But what´s that Spring Boot thingy?
4 https://spring.io/projects
5 http://projects.spring.io/spring-boot https://github.com/spring-projects/spring-boot http://start.spring.io/ https://spring.io/blog/2016/07/28/spring- boot-1-4-released Where to start?
6 Main design goals
7 Picture: https://flic.kr/p/nZxKRM
8 http://projects.spring.io/spring-boot/ “Spring Boot […] is designed to get you
up and running as quickly as possible.”
9 Picture: https://flic.kr/p/aD4qRA
10 Spring Boot favors convention over configuration […]. http://projects.spring.io/spring-boot/
11 And the details?
12 Picture: https://flic.kr/p/qRbJHR
13 Picture: https://flic.kr/p/cGmP7A
14 Embedded Tomcat, Jetty… Stand-alone No need to deploy .war’s/.ear’s
15 $ java -jar cxf-boot-simple-0.0.1-SNAPSHOT.jar! or! $ mvn spring-boot:run! Stand-alone,
no deployment
16 Picture: https://flic.kr/p/dwSu3Z
17 'starter' POMs to simplify Maven configuration
18 ! Batch, Messaging, Caching, Relational Databases, JPA, NoSQL, whatever, Redis,
Integration, Logging, WebServices, Mail, Security, Webapps, REST,… ! official: https://github.com/spring-projects/spring-boot/tree/ master/spring-boot-starters ! community: https://github.com/spring-projects/spring-boot/tree/ master/spring-boot-starters#community-contributions 'starter' POMs
19 Picture: https://flic.kr/p/8Fyhn9
20 Automatically configure Spring whenever possible
21 import org.springframework.boot.autoconfigure.condition.*; @Configuration annotated Classes: @Conditional @ConditionalOnBean(YourClassHere.class) @ConditionalOnProperty(“your.property.here“) @ConditionalOnResource
... Automatic configuration
22 Picture: https://flic.kr/p/6HgM6u
23 Production-ready features Metrics, health checks, externalized configuration…
24
25 No code generation No XML configuration!
26 I want my own custom Spring Boot Starter!
27 Howto: https://blog.codecentric.de/en/2014/11/extending-spring-boot-five- steps-writing-spring-boot-starter/ Examples: https://github.com/spring-projects/spring-boot/tree/master/spring- boot-starters#community-contributions https://github.com/codecentric/spring-boot-starter-batch-web https://github.com/codecentric/cxf-spring-boot-starter Custom
Spring Boot Starters
28 demo
29 Complete Howto: https://blog.codecentric.de/ 2016/02/spring-boot-apache-cxf/ à http://start.spring.io/ group: de.codecentric.webservice artifact:
simpleservice Web & Devtools Demo: web service with Apache CXF 1/4 CXF-Dependencies <!-- Apache CXF --> <dependency> <groupId>org.apache.cxf</groupId> <artifactId>cxf-rt-frontend-jaxws</artifactId> <version>3.1.7</version> </dependency> <dependency> <groupId>org.apache.cxf</groupId> <artifactId>cxf-rt-transports-http</artifactId> <version>3.1.7</version> </dependency>
30 Demo: web service with Apache CXF 2/4 @Bean public
ServletRegistrationBean dispatcherServlet() { return new ServletRegistrationBean(new CXFServlet(), "/soap- api/*"); } @Bean(name= Bus.DEFAULT_BUS_ID) public SpringBus springBus() { return new SpringBus(); }
31 WSDL: https://github.com/jonashackt/weather-service-wsdl/ jaxws-maven-plugin config see https://blog.codecentric.de/2016/02/spring-boot-apache-cxf/ http://cxf.apache.org/docs/jax-ws-configuration.html Demo: web
service with Apache CXF 3/4
32 @Bean public WeatherService weatherService() { return new WeatherServiceEndpoint(); }
@Bean public Endpoint endpoint() { EndpointImpl endpoint = new EndpointImpl(springBus(), weatherService()); endpoint.publish("/WeatherSoapService_1.0"); return endpoint; } Demo: web service with Apache CXF 4/4
33 Questions? J