SlideShare a Scribd company logo
Micro Frontends


for Java microservices
September 27, 2022
Matt Raible | @mraible
Photo by Jason Murphy


https://unsplash.com/photos/dk9rD8bgqOQ
@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
Micro Frontends for Java Microservices - Cork JUG 2022
Micro Frontends for Java Microservices - Cork JUG 2022
Micro Frontends for Java Microservices - Cork JUG 2022
developer.okta.com
developer.auth0.com
Agenda
A brief history of microservices


Microservices with Java


Microservices with JHipster


Introduction to Micro Frontends


Live Demo


Securing microservices with OAuth 2.1


Action!
Microservices Visionaries
“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
Micro Frontends for Java Microservices - Cork JUG 2022
“Do one thing and do it well.”
Microservices with Java
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
🍃
Micro Frontends for Java Microservices - Cork JUG 2022
Micro Frontends for Java Microservices - Cork JUG 2022
Spring WebFlux!
Spring MVC Code
@PostMapping("/points")


public ResponseEntity<Points> createPoints(@Valid @RequestBody Points points) throws URISyntaxException {


log.debug("REST request to save Points : {}", points);


if (points.getId() != null) {


throw new BadRequestAlertException("A new points cannot already have an ID", ENTITY_NAME, "idexists");


}


Points result = pointsRepository.save(points);


pointsSearchRepository.save(result);


return ResponseEntity


.created(new URI("/api/points/" + result.getId()))


.headers(HeaderUtil.createEntityCreationAlert(


applicationName, true, ENTITY_NAME, result.getId().toString()))


.body(result);


}
Spring WebFlux Code
@PostMapping("/points")


public Mono<ResponseEntity<Points>> createPoints(@Valid @RequestBody Points points) throws URISyntaxException {


log.debug("REST request to save Points : {}", points);


if (points.getId() != null) {


throw new BadRequestAlertException("A new points cannot already have an ID", ENTITY_NAME, "idexists");


}


return pointsRepository


.save(points)


.flatMap(pointsSearchRepository::save)


.map(


result -> {


try {


return ResponseEntity


.created(new URI("/api/points/" + result.getId()))


.headers(HeaderUtil.createEntityCreationAlert(


applicationName, true, ENTITY_NAME, result.getId().toString()))


.body(result);


} catch (URISyntaxException e) {


throw new RuntimeException(e);


}


}


);


}
https://developer.okta.com/blog/2021/01/20/reactive-java-microservices
What is JHipster?
Thriving OSS Project
Started by Julien Dubois on October 21, 2013
App Generator, Platform, Learning Tool …
How to Use JHipster
Install JHipster using npm:


npm install -g generator-jhipster
Create a directory and cd into it:


take app
Run it!


jhipster
Monolith, Gateway, or Microservices?


Spring MVC or Spring WebFlux?


Authentication Type?


Database Type?


Build Tool?


Web Framework?
JHipster Options
https://start.jhipster.tech
https://start.jhipster.tech/jdl-studio
Micro Frontends for Java Microservices - Cork JUG 2022
JHipster Microservices Architecture
JHipster Micro Frontends Architecture
⚡Micro Frontends
https://martinfowler.com/articles/micro-frontends.html
Native Federation
https://twitter.com/ManfredSteyer/status/1564312149580582912
Why should Java developers care?
Demo
Create apps with JDL


Run apps and e2e tests


Run everything with Docker


Switch identity providers


@oktadev/auth0-micro-frontends-
jhipster-example
🤓
Secure Microservices with OAuth 2.1
https://oauth.net/2.1
Improvements in OAuth 2.1
PKCE is required for all clients using the authorization code flow


Redirect URIs must be compared using exact string matching


The Implicit grant is omitted from this specification


The Resource Owner Password Credentials grant is omitted from this specification


Bearer token usage omits the use of bearer tokens in the query string of URIs


Refresh tokens for public clients must either be sender-constrained or one-time use
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.1 and OIDC
Spring Cloud Gateway
Relay an access token in Spring Cloud Gateway
spring:

cloud:

gateway:

default-filters:

- TokenRelay
Reactive Microservices with Spring Cloud Gateway
https://developer.okta.com/blog/2019/08/28/reactive-microservices-spring-cloud-gateway
https://auth0.com/blog/micro-frontends-for-java-microservices
https://developer.okta.com/blog/2021/01/20/reactive-java-microservices
https://developer.okta.com/blog/2021/06/01/kubernetes-spring-boot-jhipster
https://dev.to/jhipster
npm install -g generator-jhipster-kotlin
JHipster Official Blueprints
https://www.jhipster.tech/modules/official-blueprints
https://github.com/jhipster/jhipster-lite
What You Learned
What’s Next for JHipster?
SCIM
Spring Boot 3
GraphQL
* These are my personal interests.
JHipster is Knowledge
Learn More
stackoverflow.com
Spring Boot


spring.io/guides
JHipster


www.jhipster.tech
Okta APIs


developer.okta.com
developer.okta.com/blog/tags/java


@oktadev
developer.auth0.com


@auth0
Action: Try JHipster! 🚀
npm i -g generator-jhipster@7
git clone https://github.com/oktadeveloper/okta-spring-webflux-react-
example.git
https://github.com/oktadev/auth0-micro-frontends-jhipster-example
Use the Source, Luke!
Thanks!


Keep in Touch


raibledesigns.com


@mraible


Presentations


speakerdeck.com/mraible


Code


github.com/oktadev
developer.okta.com
developer.auth0.com
developer.okta.com

More Related Content

Similar to Micro Frontends for Java Microservices - Cork JUG 2022 (20)

PDF
Building Microservices with Micronaut: A Full-Stack JVM-Based Framework
Michael Redlich
 
PDF
Microservices for the Masses with Spring Boot, JHipster, and OAuth - South We...
Matt Raible
 
PDF
Microservices for the Masses with Spring Boot, JHipster, and OAuth - Jforum S...
Matt Raible
 
PDF
DeveloperWeek Global 2020 - OpenJS Foundation - The First 25 Years of Javascr...
Bethany Nicolle Griggs
 
PDF
Javantura v4 - Cloud-native Architectures and Java - Matjaž B. Jurič
HUJAK - Hrvatska udruga Java korisnika / Croatian Java User Association
 
PDF
Microservices for the Masses with Spring Boot, JHipster, and JWT - J-Spring 2017
Matt Raible
 
PDF
Monitoring your Spring Boot and Micronaut microservices with Micrometer
Ko Turk
 
PDF
Find a React Developer Specialized in Micro-Frontends & Modular Architecture.pdf
DarshanaMallick
 
PDF
Choose Your Own Adventure with JHipster & Kubernetes - Utah JUG 2020
Matt Raible
 
PDF
Putting the Native in React Native - React Native Boston
stan229
 
PPTX
Node.js meetup at Palo Alto Networks Tel Aviv
Ron Perlmuter
 
PDF
Migrating Monoliths to Microservices -- M3
Asir Selvasingh
 
PDF
Node.js Microservices Building Scalable and Reliable Applications.pdf
Sufalam Technologies
 
PPTX
Organisation of professional JavaScript Projects
Involved IT
 
DOCX
@@@Resume2016 11 11_v001
Fred Jabbari
 
PDF
Microservices for the Masses with Spring Boot, JHipster, and JWT - Devoxx UK...
Matt Raible
 
DOC
Shyam pcf
shyam kumar
 
PDF
Jenkins x azure
Kyohei Moriyama
 
PDF
Microservices for the Masses with Spring Boot, JHipster, and OAuth - Switzerl...
Matt Raible
 
PPTX
Building Microtrends With React
Nisheed Jagadish
 
Building Microservices with Micronaut: A Full-Stack JVM-Based Framework
Michael Redlich
 
Microservices for the Masses with Spring Boot, JHipster, and OAuth - South We...
Matt Raible
 
Microservices for the Masses with Spring Boot, JHipster, and OAuth - Jforum S...
Matt Raible
 
DeveloperWeek Global 2020 - OpenJS Foundation - The First 25 Years of Javascr...
Bethany Nicolle Griggs
 
Javantura v4 - Cloud-native Architectures and Java - Matjaž B. Jurič
HUJAK - Hrvatska udruga Java korisnika / Croatian Java User Association
 
Microservices for the Masses with Spring Boot, JHipster, and JWT - J-Spring 2017
Matt Raible
 
Monitoring your Spring Boot and Micronaut microservices with Micrometer
Ko Turk
 
Find a React Developer Specialized in Micro-Frontends & Modular Architecture.pdf
DarshanaMallick
 
Choose Your Own Adventure with JHipster & Kubernetes - Utah JUG 2020
Matt Raible
 
Putting the Native in React Native - React Native Boston
stan229
 
Node.js meetup at Palo Alto Networks Tel Aviv
Ron Perlmuter
 
Migrating Monoliths to Microservices -- M3
Asir Selvasingh
 
Node.js Microservices Building Scalable and Reliable Applications.pdf
Sufalam Technologies
 
Organisation of professional JavaScript Projects
Involved IT
 
@@@Resume2016 11 11_v001
Fred Jabbari
 
Microservices for the Masses with Spring Boot, JHipster, and JWT - Devoxx UK...
Matt Raible
 
Shyam pcf
shyam kumar
 
Jenkins x azure
Kyohei Moriyama
 
Microservices for the Masses with Spring Boot, JHipster, and OAuth - Switzerl...
Matt Raible
 
Building Microtrends With React
Nisheed Jagadish
 

More from Matt Raible (20)

PDF
Keep Identities in Sync the SCIMple Way - ApacheCon NA 2022
Matt Raible
 
PDF
Comparing Native Java REST API Frameworks - Seattle JUG 2022
Matt Raible
 
PDF
Reactive Java Microservices with Spring Boot and JHipster - Spring I/O 2022
Matt Raible
 
PDF
Comparing Native Java REST API Frameworks - Devoxx France 2022
Matt Raible
 
PDF
Lock That Sh*t Down! Auth Security Patterns for Apps, APIs, and Infra - Devne...
Matt Raible
 
PDF
Native Java with Spring Boot and JHipster - Garden State JUG 2021
Matt Raible
 
PDF
Java REST API Framework Comparison - PWX 2021
Matt Raible
 
PDF
Web App Security for Java Developers - PWX 2021
Matt Raible
 
PDF
Mobile App Development with Ionic, React Native, and JHipster - Connect.Tech ...
Matt Raible
 
PDF
Lock That Shit Down! Auth Security Patterns for Apps, APIs, and Infra - Joker...
Matt Raible
 
PDF
Web App Security for Java Developers - UberConf 2021
Matt Raible
 
PDF
Java REST API Framework Comparison - UberConf 2021
Matt Raible
 
PDF
Native Java with Spring Boot and JHipster - SF JUG 2021
Matt Raible
 
PDF
Lock That Shit Down! Auth Security Patterns for Apps, APIs, and Infra - Sprin...
Matt Raible
 
PDF
Reactive Java Microservices with Spring Boot and JHipster - Denver JUG 2021
Matt Raible
 
PDF
Get Hip with JHipster - Colorado Springs Open Source User Group 2021
Matt Raible
 
PDF
JHipster and Okta - JHipster Virtual Meetup December 2020
Matt Raible
 
PDF
Java REST API Comparison: Micronaut, Quarkus, and Spring Boot - jconf.dev 2020
Matt Raible
 
PDF
Security Patterns for Microservice Architectures - SpringOne 2020
Matt Raible
 
PDF
Security Patterns for Microservice Architectures - ADTMag Microservices & API...
Matt Raible
 
Keep Identities in Sync the SCIMple Way - ApacheCon NA 2022
Matt Raible
 
Comparing Native Java REST API Frameworks - Seattle JUG 2022
Matt Raible
 
Reactive Java Microservices with Spring Boot and JHipster - Spring I/O 2022
Matt Raible
 
Comparing Native Java REST API Frameworks - Devoxx France 2022
Matt Raible
 
Lock That Sh*t Down! Auth Security Patterns for Apps, APIs, and Infra - Devne...
Matt Raible
 
Native Java with Spring Boot and JHipster - Garden State JUG 2021
Matt Raible
 
Java REST API Framework Comparison - PWX 2021
Matt Raible
 
Web App Security for Java Developers - PWX 2021
Matt Raible
 
Mobile App Development with Ionic, React Native, and JHipster - Connect.Tech ...
Matt Raible
 
Lock That Shit Down! Auth Security Patterns for Apps, APIs, and Infra - Joker...
Matt Raible
 
Web App Security for Java Developers - UberConf 2021
Matt Raible
 
Java REST API Framework Comparison - UberConf 2021
Matt Raible
 
Native Java with Spring Boot and JHipster - SF JUG 2021
Matt Raible
 
Lock That Shit Down! Auth Security Patterns for Apps, APIs, and Infra - Sprin...
Matt Raible
 
Reactive Java Microservices with Spring Boot and JHipster - Denver JUG 2021
Matt Raible
 
Get Hip with JHipster - Colorado Springs Open Source User Group 2021
Matt Raible
 
JHipster and Okta - JHipster Virtual Meetup December 2020
Matt Raible
 
Java REST API Comparison: Micronaut, Quarkus, and Spring Boot - jconf.dev 2020
Matt Raible
 
Security Patterns for Microservice Architectures - SpringOne 2020
Matt Raible
 
Security Patterns for Microservice Architectures - ADTMag Microservices & API...
Matt Raible
 
Ad

Recently uploaded (20)

PPTX
Comprehensive Risk Assessment Module for Smarter Risk Management
EHA Soft Solutions
 
PPTX
Change Common Properties in IBM SPSS Statistics Version 31.pptx
Version 1 Analytics
 
PDF
TheFutureIsDynamic-BoxLang witch Luis Majano.pdf
Ortus Solutions, Corp
 
PPTX
Finding Your License Details in IBM SPSS Statistics Version 31.pptx
Version 1 Analytics
 
PDF
Digger Solo: Semantic search and maps for your local files
seanpedersen96
 
PDF
[Solution] Why Choose the VeryPDF DRM Protector Custom-Built Solution for You...
Lingwen1998
 
PPTX
AEM User Group: India Chapter Kickoff Meeting
jennaf3
 
PPTX
Home Care Tools: Benefits, features and more
Third Rock Techkno
 
PPTX
OpenChain @ OSS NA - In From the Cold: Open Source as Part of Mainstream Soft...
Shane Coughlan
 
PDF
Automate Cybersecurity Tasks with Python
VICTOR MAESTRE RAMIREZ
 
PPTX
Customise Your Correlation Table in IBM SPSS Statistics.pptx
Version 1 Analytics
 
PPTX
Agentic Automation Journey Session 1/5: Context Grounding and Autopilot for E...
klpathrudu
 
PDF
MiniTool Partition Wizard Free Crack + Full Free Download 2025
bashirkhan333g
 
PDF
iTop VPN With Crack Lifetime Activation Key-CODE
utfefguu
 
PDF
Wondershare PDFelement Pro Crack for MacOS New Version Latest 2025
bashirkhan333g
 
PDF
4K Video Downloader Plus Pro Crack for MacOS New Download 2025
bashirkhan333g
 
PDF
SAP Firmaya İade ABAB Kodları - ABAB ile yazılmıl hazır kod örneği
Salih Küçük
 
PDF
NEW-Viral>Wondershare Filmora 14.5.18.12900 Crack Free
sherryg1122g
 
PDF
The 5 Reasons for IT Maintenance - Arna Softech
Arna Softech
 
PDF
Top Agile Project Management Tools for Teams in 2025
Orangescrum
 
Comprehensive Risk Assessment Module for Smarter Risk Management
EHA Soft Solutions
 
Change Common Properties in IBM SPSS Statistics Version 31.pptx
Version 1 Analytics
 
TheFutureIsDynamic-BoxLang witch Luis Majano.pdf
Ortus Solutions, Corp
 
Finding Your License Details in IBM SPSS Statistics Version 31.pptx
Version 1 Analytics
 
Digger Solo: Semantic search and maps for your local files
seanpedersen96
 
[Solution] Why Choose the VeryPDF DRM Protector Custom-Built Solution for You...
Lingwen1998
 
AEM User Group: India Chapter Kickoff Meeting
jennaf3
 
Home Care Tools: Benefits, features and more
Third Rock Techkno
 
OpenChain @ OSS NA - In From the Cold: Open Source as Part of Mainstream Soft...
Shane Coughlan
 
Automate Cybersecurity Tasks with Python
VICTOR MAESTRE RAMIREZ
 
Customise Your Correlation Table in IBM SPSS Statistics.pptx
Version 1 Analytics
 
Agentic Automation Journey Session 1/5: Context Grounding and Autopilot for E...
klpathrudu
 
MiniTool Partition Wizard Free Crack + Full Free Download 2025
bashirkhan333g
 
iTop VPN With Crack Lifetime Activation Key-CODE
utfefguu
 
Wondershare PDFelement Pro Crack for MacOS New Version Latest 2025
bashirkhan333g
 
4K Video Downloader Plus Pro Crack for MacOS New Download 2025
bashirkhan333g
 
SAP Firmaya İade ABAB Kodları - ABAB ile yazılmıl hazır kod örneği
Salih Küçük
 
NEW-Viral>Wondershare Filmora 14.5.18.12900 Crack Free
sherryg1122g
 
The 5 Reasons for IT Maintenance - Arna Softech
Arna Softech
 
Top Agile Project Management Tools for Teams in 2025
Orangescrum
 
Ad

Micro Frontends for Java Microservices - Cork JUG 2022