SlideShare a Scribd company logo
Microservices for the Masses with Spring Boot, JHipster, and OAuth
September 2, 2019
Matt Raible | @mraible
Photo by Shannon Tremaine on https://unsplash.com/photos/NRz7SfpnqUM
Do you use microservices?
Microservices for the Masses with Spring Boot, JHipster, and OAuth - London Java Community 2019
Blogger on raibledesigns.com and

developer.okta.com/blog
Web Developer and Java Champion
Father, Husband, Skier, Mountain
Biker, Whitewater Rafter
Open Source Connoisseur
Hi, I’m Matt Raible!
Bus Lover
Okta Developer Advocate
Microservices for the Masses with Spring Boot, JHipster, and OAuth - London Java Community 2019
Microservices for the Masses with Spring Boot, JHipster, and OAuth - London Java Community 2019
Microservices for the Masses with Spring Boot, JHipster, and OAuth - London Java Community 2019
developer.okta.com
What About You?
Agenda
1. Introduction to Microservices
2. Microservices with JHipster
3. Deploying to the Cloud
4. Developing Mobile Apps with JHipster
5. JHipster Roadmap
Part 1
Introduction to Microservices
History of Microservices
Microservices Architecture Philosophy
Why Microservices?
Demo: A Microservices Architecture with
Spring Boot and Spring Cloud
Microservices for the Masses with Spring Boot, JHipster, and OAuth - London Java Community 2019
Microservices Visionaries
Microservices for the Masses with Spring Boot, JHipster, and OAuth - London Java Community 2019
“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
“Do one thing and do it well.”
“You shouldn't start with a microservices
architecture. Instead begin with a
monolith, keep it modular, and split it
into microservices once the monolith
becomes a problem.”
Martin Fowler March 2014
Microservices for the Masses with Spring Boot, JHipster, and OAuth - London Java Community 2019
start.spring.io
Microservices for the Masses with Spring Boot, JHipster, and OAuth - London Java Community 2019
Microservices for the Masses with Spring Boot, JHipster, and OAuth - London Java Community 2019
Demo
Using start.spring.io, create:
A service registry
A gateway
A catalog service
Create an endpoint in the catalog service
Create a filtered endpoint in the gateway
Show failover capabilities
Show Spring Security OAuth
https://github.com/oktadeveloper/java-
microservices-examples
Java Microservices with Spring Boot and Spring Cloud
https://developer.okta.com/blog/2019/05/22/java-microservices-spring-boot-spring-cloud
Microservices with JHipster
What is JHipster?
Installing and Using JHipster
JHipster’s Microservice Features
Progressive Web Applications Overview
Part 2
What is JHipster?
+ =
JHipster jhipster.tech
JHipster is a development platform to generate, develop and deploy 
Spring Boot + Angular/React Web applications and Spring microservices. 
and Vue! ✨
JHipster is Inclusive
https://github.com/jhipster/jhipster-artwork
A powerful workflow to build your
application with Yeoman, Webpack, and
Maven/Gradle
JHipster Goals
A sleek, modern, mobile-first front-
end with Angular and Bootstrap
A high-performance and robust
Java stack on the server side with
Spring Boot
A robust microservice architecture
with JHipster Registry, Netflix OSS,
Elastic Stack, and Docker
How to Use JHipster
Install JHipster and Yeoman, using npm:
npm install -g generator-jhipster
Create a directory and cd into it:
mkdir newapp && cd newapp
Run it!
jhipster
Microservices with JHipster
https://www.jhipster.tech/microservices-architecture
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
Monolith Examples
JHipster 6 Demo
github.com/mraible/jhipster6-demo
youtu.be/uQqlO3IGpTU
21-Points Health
github.com/mraible/21-points
infoq.com/minibooks/jhipster-mini-book
Progressive Web Apps
Originate from a secure origin, load while offline, and reference a
web app manifest.
Progressive Web Apps
Can be installed on your mobile device, look and act like a native
application, but are distributed through the web.
Progressive Web Apps
Are fast!
Enable PWA in JHipster
<script>
if ('serviceWorker' in navigator) {
window.addEventListener('load', function() {
navigator.serviceWorker.register('/service-worker.js')
.then(function () {
console.log('Service Worker Registered');
});
});
}
</script>
gateway/src/main/webapp/index.html
Force HTTPS in Spring Boot
gateway/src/main/java/com/okta/developer/gateway/config/SecurityConfiguration.java
@Configuration
public class SecurityConfiguration extends WebSecurityConfigurerAdapter {
@Override
protected void configure(HttpSecurity http) throws Exception {
http.requiresChannel()
.requestMatchers(r -> r.getHeader("X-Forwarded-Proto") != null)
.requiresSecure();
}
}
https://developer.okta.com/blog/2018/07/30/10-ways-to-secure-spring-boot
Demo
Using JHipster, create:
A gateway
A store microservices app
A blog microservices app
Generate entities in apps and on gateway
Convert gateway to be a PWA
Run everything in Docker
https://github.com/oktadeveloper/java-
microservices-examples
Part 3
Deploy to the Cloud
Options for Deploying JHipster
Heroku
Cloud Foundry
AWS
Google Cloud
Microsoft Azure
For monoliths:
jhipster heroku
For microservices:
Deploy JHipster Registry
Build and deploy microservice
Build and deploy gateway
http://bit.ly/heroku-jhipster-microservices
For monoliths:
jhipster cloudfoundry
For microservices:
Deploy JHipster Registry
Build and deploy microservice
Build and deploy gateway
http://www.jhipster.tech/cloudfoundry
Using Elastic Container Service
jhipster aws-containers
Using Elastic Beanstalk
jhipster aws
Boxfuse
boxfuse run -env=prod
http://www.jhipster.tech/aws
http://www.jhipster.tech/boxfuse
mvn package -Pprod jib:dockerBuild
jhipster kubernetes
./kubectl-apply.sh
kubectl get svc gateway
https://developer.okta.com/blog/2017/06/20/
develop-microservices-with-jhipster
Part 4
Developing Mobile Apps with JHipster
What is Ionic?
Why?
Ionic Module for JHipster
JWT and OIDC Support
Entity Generator
Ionic
Ionic Framework
Develop Hybrid & PWA
Apps
https://ionicframework.com
Stencil
Vanilla Web
Components
https://stenciljs.com
PWA Toolkit
Lightning fast PWAs
https://github.com/ionic-
team/ionic-pwa-toolkit
Why?
The first version of 21-Points Health I wrote with JHipster 2.x was
painful to use on a mobile device. Versions 4.x and 5.x are better, but
still not great.
I want to develop the best user experience. Native apps are painful to
distribute, but work better than PWAs (on iOS).
How is a mobile app for JHipster
different from its Angular UI?
Run it!
yo jhipster-ionic
Ionic Module for JHipster
Because Ionic Apps need some JHipster 💙 too!
https://github.com/oktadeveloper/generator-jhipster-ionic
Install Ionic and the Ionic Module for JHipster, using npm:
npm install -g ionic generator-jhipster-ionic
Profit!
🤑
Use Ionic for JHipster to Create Mobile Apps
https://developer.okta.com/blog/2019/06/24/ionic-4-angular-spring-boot-jhipster
Create an app:
ignite new myapp -b ignite-jhipster
Ignite JHipster
https://github.com/ruddell/ignite-jhipster
Install Ignite CLI and Ignite JHipster, using npm:
npm i -g ignite-cli ignite-jhipster
Ignite!
🔥
A React Native boilerplate for JHipster apps
Build a Mobile App with React Native
https://developer.okta.com/blog/2018/10/10/react-native-spring-boot-mobile-app
Demo
Create an Ionic 4 app for JHipster
Generate entities that exist on gateway
Deploy to emulator
Deploy to phone
https://github.com/oktadeveloper/
okta-ionic4-jhipster-example
Part 5 JHipster Roadmap
What You Learned
What’s Next for JHipster
What You Learned
Microservices with Spring Cloud Config and JHipster
https://developer.okta.com/blog/2019/05/23/java-microservices-spring-cloud-config
JHipster Mobile Apps and Microservices on Pluralsight
pluralsight.com/courses/play-by-play-developing-microservices-mobile-apps-jhipster
What’s Next for JHipster?
Full Reactive with WebFlux
and Spring Cloud Gateway
Spring Boot 2.2
GraphQL and Micro Frontends
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
Learn More
stackoverflow.com
Spring Boot
spring.io/guides
JHipster
www.jhipster.tech
Okta APIs
developer.okta.com
developer.okta.com/blog
@oktadev
Reactive Microservices with Spring Cloud Gateway
https://developer.okta.com/blog/2019/08/28/reactive-microservices-spring-cloud-gateway
Action: Try JHipster!
https://developer.okta.com/blog/2019/04/04/java-11-java-12-jhipster-oidc
git clone https://github.com/oktadeveloper/okta-spring-webflux-react-
example.git
https://github.com/oktadeveloper/java-microservices-examples
Use the Source, Luke!
Thanks!
Keep in Touch
raibledesigns.com
@mraible
Presentations
speakerdeck.com/mraible
Code
github.com/oktadeveloper
developer.okta.com
developer.okta.com

More Related Content

What's hot (11)

PDF
Spring Boot APIs and Angular Apps: Get Hip with JHipster! KCDC 2019
Matt Raible
 
PDF
Bootiful Development with Spring Boot and React - SpringOne 2017
Matt Raible
 
PDF
Bootiful Development with Spring Boot and React - RWX 2017
Matt Raible
 
PPTX
12 Best Android Libraries to use in 2021
Mobcoder
 
PPTX
Spring Projects Infrastructure
Gunnar Hillert
 
PDF
Seven Simple Reasons to Use AppFuse
Matt Raible
 
PDF
How to Win at UI Development in the World of Microservices - THAT Conference ...
Matt Raible
 
PDF
Java REST API Framework Comparison - PWX 2021
Matt Raible
 
PDF
Microservices for the Masses with Spring Boot, JHipster, and OAuth - Switzerl...
Matt Raible
 
PPTX
Android study jams iiitv sesion 3
AshutoshSingh1124
 
PDF
CraftCamp for Students - Introduction to JHipster
craftworkz
 
Spring Boot APIs and Angular Apps: Get Hip with JHipster! KCDC 2019
Matt Raible
 
Bootiful Development with Spring Boot and React - SpringOne 2017
Matt Raible
 
Bootiful Development with Spring Boot and React - RWX 2017
Matt Raible
 
12 Best Android Libraries to use in 2021
Mobcoder
 
Spring Projects Infrastructure
Gunnar Hillert
 
Seven Simple Reasons to Use AppFuse
Matt Raible
 
How to Win at UI Development in the World of Microservices - THAT Conference ...
Matt Raible
 
Java REST API Framework Comparison - PWX 2021
Matt Raible
 
Microservices for the Masses with Spring Boot, JHipster, and OAuth - Switzerl...
Matt Raible
 
Android study jams iiitv sesion 3
AshutoshSingh1124
 
CraftCamp for Students - Introduction to JHipster
craftworkz
 

Similar to Microservices for the Masses with Spring Boot, JHipster, and OAuth - London Java Community 2019 (20)

PDF
Microservices for the Masses with Spring Boot and JHipster - Chicago JUG 2018
Matt Raible
 
PDF
Microservices for the Masses with Spring Boot, JHipster and OAuth - GIDS 2019
Matt Raible
 
PDF
Microservices for the Masses with Spring Boot and JHipster - RWX 2018
Matt Raible
 
PDF
Mobile App Development with Ionic, React Native, and JHipster - Connect.Tech ...
Matt Raible
 
PDF
Microservices for the Masses with Spring Boot, JHipster, and OAuth - Jforum S...
Matt Raible
 
PDF
Microservices for the Masses with Spring Boot, JHipster, and OAuth - South We...
Matt Raible
 
PDF
Micro Frontends for Java Microservices - Cork JUG 2022
Matt Raible
 
PDF
Get Hip with JHipster - GIDS 2019
Matt Raible
 
PDF
Micro Frontends for Java Microservices - Belfast JUG 2022
Matt Raible
 
PDF
Get Hip with JHipster - Colorado Springs Open Source User Group 2021
Matt Raible
 
PDF
Micro Frontends for Java Microservices - Dublin JUG 2022
Matt Raible
 
PDF
Spring Boot APIs and Angular PWAs: Get Hip with JHipster - PWX 2019
Matt Raible
 
PDF
Choose Your Own Adventure with JHipster & Kubernetes - Utah JUG 2020
Matt Raible
 
PDF
Choose Your Own Adventure with JHipster & Kubernetes - Denver JUG 2020
Matt Raible
 
PDF
What's New in JHipsterLand - Devoxx US 2017
Matt Raible
 
PDF
Developing PWAs and Mobile Apps with Ionic, Angular, and JHipster - Devoxx Mo...
Matt Raible
 
PDF
Get Hip with JHipster: Spring Boot + AngularJS + Bootstrap - GeekOut 2016
Matt Raible
 
PDF
Reactive Java Microservices with Spring Boot and JHipster - Spring I/O 2022
Matt Raible
 
PDF
What's New in JHipsterLand - DevNexus 2017
Matt Raible
 
PDF
JHipster overview and roadmap (August 2017)
Julien Dubois
 
Microservices for the Masses with Spring Boot and JHipster - Chicago JUG 2018
Matt Raible
 
Microservices for the Masses with Spring Boot, JHipster and OAuth - GIDS 2019
Matt Raible
 
Microservices for the Masses with Spring Boot and JHipster - RWX 2018
Matt Raible
 
Mobile App Development with Ionic, React Native, and JHipster - Connect.Tech ...
Matt Raible
 
Microservices for the Masses with Spring Boot, JHipster, and OAuth - Jforum S...
Matt Raible
 
Microservices for the Masses with Spring Boot, JHipster, and OAuth - South We...
Matt Raible
 
Micro Frontends for Java Microservices - Cork JUG 2022
Matt Raible
 
Get Hip with JHipster - GIDS 2019
Matt Raible
 
Micro Frontends for Java Microservices - Belfast JUG 2022
Matt Raible
 
Get Hip with JHipster - Colorado Springs Open Source User Group 2021
Matt Raible
 
Micro Frontends for Java Microservices - Dublin JUG 2022
Matt Raible
 
Spring Boot APIs and Angular PWAs: Get Hip with JHipster - PWX 2019
Matt Raible
 
Choose Your Own Adventure with JHipster & Kubernetes - Utah JUG 2020
Matt Raible
 
Choose Your Own Adventure with JHipster & Kubernetes - Denver JUG 2020
Matt Raible
 
What's New in JHipsterLand - Devoxx US 2017
Matt Raible
 
Developing PWAs and Mobile Apps with Ionic, Angular, and JHipster - Devoxx Mo...
Matt Raible
 
Get Hip with JHipster: Spring Boot + AngularJS + Bootstrap - GeekOut 2016
Matt Raible
 
Reactive Java Microservices with Spring Boot and JHipster - Spring I/O 2022
Matt Raible
 
What's New in JHipsterLand - DevNexus 2017
Matt Raible
 
JHipster overview and roadmap (August 2017)
Julien Dubois
 
Ad

More from Matt Raible (19)

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
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
Web App Security for Java Developers - PWX 2021
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
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
 
PDF
Security Patterns for Microservice Architectures - London Java Community 2020
Matt Raible
 
PDF
Security Patterns for Microservice Architectures - Oktane20
Matt Raible
 
PDF
Full Stack Reactive with React and Spring WebFlux - Switzerland JUG 2020
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
 
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
 
Web App Security for Java Developers - PWX 2021
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
 
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
 
Security Patterns for Microservice Architectures - London Java Community 2020
Matt Raible
 
Security Patterns for Microservice Architectures - Oktane20
Matt Raible
 
Full Stack Reactive with React and Spring WebFlux - Switzerland JUG 2020
Matt Raible
 
Ad

Recently uploaded (20)

PPTX
Why Businesses Are Switching to Open Source Alternatives to Crystal Reports.pptx
Varsha Nayak
 
PDF
Build It, Buy It, or Already Got It? Make Smarter Martech Decisions
bbedford2
 
PDF
HiHelloHR – Simplify HR Operations for Modern Workplaces
HiHelloHR
 
PDF
Top Agile Project Management Tools for Teams in 2025
Orangescrum
 
PPTX
Transforming Mining & Engineering Operations with Odoo ERP | Streamline Proje...
SatishKumar2651
 
PPTX
Finding Your License Details in IBM SPSS Statistics Version 31.pptx
Version 1 Analytics
 
PPTX
Tally software_Introduction_Presentation
AditiBansal54083
 
PDF
Digger Solo: Semantic search and maps for your local files
seanpedersen96
 
PDF
IDM Crack with Internet Download Manager 6.42 Build 43 with Patch Latest 2025
bashirkhan333g
 
PPTX
Hardware(Central Processing Unit ) CU and ALU
RizwanaKalsoom2
 
PDF
SAP Firmaya İade ABAB Kodları - ABAB ile yazılmıl hazır kod örneği
Salih Küçük
 
PDF
The 5 Reasons for IT Maintenance - Arna Softech
Arna Softech
 
PDF
MiniTool Partition Wizard Free Crack + Full Free Download 2025
bashirkhan333g
 
PDF
SciPy 2025 - Packaging a Scientific Python Project
Henry Schreiner
 
PPTX
In From the Cold: Open Source as Part of Mainstream Software Asset Management
Shane Coughlan
 
PPTX
Agentic Automation: Build & Deploy Your First UiPath Agent
klpathrudu
 
PDF
[Solution] Why Choose the VeryPDF DRM Protector Custom-Built Solution for You...
Lingwen1998
 
PDF
Wondershare PDFelement Pro Crack for MacOS New Version Latest 2025
bashirkhan333g
 
PPTX
Tally_Basic_Operations_Presentation.pptx
AditiBansal54083
 
PDF
Why Businesses Are Switching to Open Source Alternatives to Crystal Reports.pdf
Varsha Nayak
 
Why Businesses Are Switching to Open Source Alternatives to Crystal Reports.pptx
Varsha Nayak
 
Build It, Buy It, or Already Got It? Make Smarter Martech Decisions
bbedford2
 
HiHelloHR – Simplify HR Operations for Modern Workplaces
HiHelloHR
 
Top Agile Project Management Tools for Teams in 2025
Orangescrum
 
Transforming Mining & Engineering Operations with Odoo ERP | Streamline Proje...
SatishKumar2651
 
Finding Your License Details in IBM SPSS Statistics Version 31.pptx
Version 1 Analytics
 
Tally software_Introduction_Presentation
AditiBansal54083
 
Digger Solo: Semantic search and maps for your local files
seanpedersen96
 
IDM Crack with Internet Download Manager 6.42 Build 43 with Patch Latest 2025
bashirkhan333g
 
Hardware(Central Processing Unit ) CU and ALU
RizwanaKalsoom2
 
SAP Firmaya İade ABAB Kodları - ABAB ile yazılmıl hazır kod örneği
Salih Küçük
 
The 5 Reasons for IT Maintenance - Arna Softech
Arna Softech
 
MiniTool Partition Wizard Free Crack + Full Free Download 2025
bashirkhan333g
 
SciPy 2025 - Packaging a Scientific Python Project
Henry Schreiner
 
In From the Cold: Open Source as Part of Mainstream Software Asset Management
Shane Coughlan
 
Agentic Automation: Build & Deploy Your First UiPath Agent
klpathrudu
 
[Solution] Why Choose the VeryPDF DRM Protector Custom-Built Solution for You...
Lingwen1998
 
Wondershare PDFelement Pro Crack for MacOS New Version Latest 2025
bashirkhan333g
 
Tally_Basic_Operations_Presentation.pptx
AditiBansal54083
 
Why Businesses Are Switching to Open Source Alternatives to Crystal Reports.pdf
Varsha Nayak
 

Microservices for the Masses with Spring Boot, JHipster, and OAuth - London Java Community 2019