Reactive Java Microservices
with Spring Boot, JHipster, and OAuth
Jan 21, 2021
Matt Raible | @mraible
Photo by Taber Andrew Bain
https://www.flickr.com/photos/andrewbain/2700290996
Slide 2
Slide 2 text
No content
Slide 3
Slide 3 text
What is JHipster?
Slide 4
Slide 4 text
How to Use JHipster
Install JHipster and Yeoman, using npm:
npm install -g generator-jhipster
Create a directory and cd into it:
take app
Run it!
jhipster
Slide 5
Slide 5 text
* PLEASE run JHipster in an brand new, empty directory; else 😕
Monolith, Gateway, or Microservices?
Spring MVC or Spring WebFlux?
Authentication Type?
Database Type?
Build Tool?
Web Framework?
JHipster Options
Slide 6
Slide 6 text
Does JHipster Provide the Paradox of Choice?
Slide 7
Slide 7 text
start.jhipster.tech
Slide 8
Slide 8 text
https://start.jhipster.tech/jdl-studio
Slide 9
Slide 9 text
Thriving OSS Project
Started by Julien Dubois on October 21, 2013
App Generator, Platform, Learning Tool …
Slide 10
Slide 10 text
@mraible
Hi, I’m Matt Raible
Father, Husband, Skier, Mountain
Biker, Whitewater Rafter
Bus Lover
Web Developer and Java Champion
Okta Developer Advocate
Blogger on raibledesigns.com and
developer.okta.com/blog
@mraible
Slide 11
Slide 11 text
No content
Slide 12
Slide 12 text
No content
Slide 13
Slide 13 text
No content
Slide 14
Slide 14 text
developer.okta.com
Slide 15
Slide 15 text
Spring
History of Spring
October 2002 - Rod Johnson writes
J2EE Design & Development
2004 - Spring 1.0
2006 - Spring 2.0 with better XML
2009 - JavaConfig
2014 - Spring Boot 1.0
2015 - Spring Cloud 1.0
🍃
Slide 16
Slide 16 text
Microservices Visionaries
Slide 17
Slide 17 text
“Any organization that designs a system
(defined broadly) will produce a design
whose structure is a copy of the
organization's communication structure.”
Conway’s Law
Melvin Conway 1967
Slide 18
Slide 18 text
No content
Slide 19
Slide 19 text
“Do one thing and do it well.”
Slide 20
Slide 20 text
No content
Slide 21
Slide 21 text
No content
Slide 22
Slide 22 text
Spring WebFlux!
Slide 23
Slide 23 text
Spring Cloud Gateway
Slide 24
Slide 24 text
yelp.com/callback
Back to redirect URI
with authorization code
Exchange code for
access token and ID token
accounts.google.com
Email
**********
Go to authorization server
Redirect URI: yelp.com/cb
Scope: openid profile
Authorization Server
yelp.com
Connect with Google
Resource owner
Client
accounts.google.com
Allow Yelp to access your public
profile and contacts?
No Yes
Request consent
from resource owner
Hello Matt!
accounts.google
Get user info
with access token
/userinfo
OAuth 2.0 and OIDC
Slide 25
Slide 25 text
No content
Slide 26
Slide 26 text
Demo
Create microservices with JDL
Run apps and e2e tests
Switch identity providers
Run everything with Docker
https://github.com/oktadeveloper/
java-microservices-examples
🤓
What’s Next for JHipster?
Micro Frontends
Spring Boot 2.4
GraphQL
Slide 30
Slide 30 text
Reactive Microservices with Spring Cloud Gateway
https://developer.okta.com/blog/2019/08/28/reactive-microservices-spring-cloud-gateway
Slide 31
Slide 31 text
The JHipster Mini-Book
Written with Asciidoctor
Free download from InfoQ:
infoq.com/minibooks/jhipster-mini-book
Quick and to the point, 164 pages
Developed a real world app:
www.21-points.com
Buy for $20 or download for FREE
Slide 32
Slide 32 text
Learn More
stackoverflow.com
Spring Boot
spring.io/guides
JHipster
www.jhipster.tech
Okta APIs
developer.okta.com
Slide 33
Slide 33 text
developer.okta.com/blog
@oktadev
Slide 34
Slide 34 text
Action: Try JHipster 7! 🚀
npm i -g generator-jhipster@beta
Slide 35
Slide 35 text
git clone https://github.com/oktadeveloper/okta-spring-webflux-react-
example.git
https://github.com/oktadeveloper/java-microservices-examples
Use the Source, Luke!