Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Spring Boot quickstart
Search
Jonas Hecht
August 30, 2016
Technology
53
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Spring Boot quickstart
Spring Boot design principles and features incl. a hands on demo with Apache CXF
Jonas Hecht
August 30, 2016
Transcript
33 slides
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
Other Decks in Technology
See All in Technology
Biohub - Cell Tracking During Development 5th place solution
rist
0
160
アラートを見直していたら営業組織への理解にちょっとだけ繋がった話
z63d
1
200
Linuxネットワークスタック進化の軌跡: 過去10年の歩みと最新トレンド
orimanabu
4
650
AWS Quick 入門 | 目指せ Quick マスター 01
inariku
PRO
2
340
落とし穴にハマってわかった 開発生産性を測るときに気をつけたいこと
munakata
1
170
20261113_JAWS_Osaka
takuyay0ne
0
460
これからのデータエンジニアの役割について考える / Rethinking the Role of Data Engineers in the AI Era
okiyuki99
0
490
[JAWS Festa 2026]一番いい仕事は、請求書に現れない / jawsfesta2026
sh_fk2
2
520
内製アプリとClaudeスキルのセキュリティチェック、 Backlogの課題で回しています。
ayaka_egaaa
0
190
Go初心者のクラウドエンジニアが、デプロイを通して旨味を知っていく話
ryudai
1
210
田んぼから始まる挑戦 〜新米農家の1年目〜
miu_crescent
PRO
0
360
[NW-JAWS DAY]「うちのAWS、インターネット出られないんで」― AWS外の自社サービスをPrivateLinkでシュッと公開する方法
ykimi
2
310
Featured
See All Featured
Facilitating Awesome Meetings
lara
57
7.2k
How to Ace a Technical Interview
jacobian
280
24k
Lightning Talk: Beautiful Slides for Beginners
inesmontani
PRO
2
790
Designing Powerful Visuals for Engaging Learning
tmiket
1
650
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
123
22k
Designing for Timeless Needs
cassininazir
1
560
SEO Brein meetup: CTRL+C is not how to scale international SEO
lindahogenes
2
3k
Collaborative Software Design: How to facilitate domain modelling decisions
baasie
1
380
Bioeconomy Workshop: Dr. Julius Ecuru, Opportunities for a Bioeconomy in West Africa
akademiya2063
PRO
1
460
DevOps and Value Stream Thinking: Enabling flow, efficiency and business value
helenjbeal
2
450
Conquering PDFs: document understanding beyond plain text
inesmontani
PRO
4
3.3k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
230
23k