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
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
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
生成AI時代にこそ求められるSRE / SRE for Gen AI era
ymotongpoo
5
2.6k
Context Engineeringの取り組み
nutslove
0
280
学生・新卒・ジュニアから目指すSRE
hiroyaonoe
2
540
月間数億レコードのアクセスログ基盤を無停止・低コストでAWS移行せよ!アプリケーションエンジニアのSREチャレンジ💪
miyamu
0
800
Introduction to Sansan, inc / Sansan Global Development Center, Inc.
sansan33
PRO
0
3k
SREが向き合う大規模リアーキテクチャ 〜信頼性とアジリティの両立〜
zepprix
0
390
2026年はチャンキングを極める!
shibuiwilliam
9
1.9k
使いにくいの壁を突破する
sansantech
PRO
1
120
あたらしい上流工程の形。 0日導入からはじめるAI駆動PM
kumaiu
5
760
Sansan Engineering Unit 紹介資料
sansan33
PRO
1
3.8k
Amazon S3 Vectorsを使って資格勉強用AIエージェントを構築してみた
usanchuu
3
430
仕様書駆動AI開発の実践: Issue→Skill→PRテンプレで 再現性を作る
knishioka
2
580
Featured
See All Featured
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
25
1.7k
Building AI with AI
inesmontani
PRO
1
680
Design of three-dimensional binary manipulators for pick-and-place task avoiding obstacles (IECON2024)
konakalab
0
350
Facilitating Awesome Meetings
lara
57
6.7k
Impact Scores and Hybrid Strategies: The future of link building
tamaranovitovic
0
200
Hiding What from Whom? A Critical Review of the History of Programming languages for Music
tomoyanonymous
2
410
The Illustrated Guide to Node.js - THAT Conference 2024
reverentgeek
0
250
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
333
22k
Side Projects
sachag
455
43k
Testing 201, or: Great Expectations
jmmastey
46
8k
Fashionably flexible responsive web design (full day workshop)
malarkey
408
66k
Navigating the Design Leadership Dip - Product Design Week Design Leaders+ Conference 2024
apolaine
0
170
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