Spring Boot APIs and Angular PWAs: Get Hip with JHipster - PWX 2019

72a2082c6a4dd79ad68befb3db911616?s=47 Matt Raible
December 04, 2019

Spring Boot APIs and Angular PWAs: Get Hip with JHipster - PWX 2019

JHipster is bad-ass. It's an Apache-licensed open source project that allows you to generate Spring Boot APIs and Angular (or React!) apps. It has a vibrant community and ecosystem with support for deploying to many cloud providers and using the latest DevOps buzzwords, like Docker and K8s.

This session will show you JHipster, why it's cool, and show you how to create an app with it.

Demo tutorial: https://github.com/mraible/jhipster6-demo


Matt Raible

December 04, 2019


  1. 1.

    Matt Raible | @mraible Spring Boot APIs and Angular Apps:

    Get Hip with JHipster! December 4, 2019 Photo by Michael Longmire https://unsplash.com/photos/giuCQDhFDEY
  2. 2.

    Blogger on raibledesigns.com and developer.okta.com/blog Web Developer and Java Champion

    Father, Skier, Mountain Biker, Whitewater Rafter Open Source Developer + User Who is Matt Raible? Bus Lover Okta Developer Advocate
  3. 3.
  4. 4.
  5. 5.
  6. 8.

    What about YOU? Are you a Java Developer? Web Developer?

    How long have you been doing web development? Do you like Spring? Java/Jakarta EE? Do you like JavaScript? TypeScript?
  7. 10.

    Java 8 Parallel Collections JSR 310 Date and Time API

    Functional Interfaces with default method Lambda Expressions (a.k.a. Closures) Nashorn JavaScript Engine
  8. 11.

    Java 11 New String Methods File Utility Methods Local Variable

    Syntax: var Java EE and CORBA modules removed What about Java 12?
  9. 12.

    Hipster n. noun 1. One who is exceptionally aware of

    or interested in the latest trends and tastes.
  10. 13.

    Latest trends in JavaLand? Microservices Embedded App Servers Deployment with

    Containers Environments: dev, test, production Auto-Configuration Reactive
  11. 14.

    Spring Boot Automatically configures Spring whenever possible Provides production-ready features

    such as metrics, health checks and externalized configuration Absolutely no code generation and no requirement for XML configuration Embeds Tomcat, Jetty or Undertow directly
  12. 16.

    @SpringBootApplication public class DemoApplication { public static void main(String[] args)

    { SpringApplication.run(DemoApplication.class, args); } } @Entity class Blog { @Id @GeneratedValue private Long id; private String name; // getters, setters, toString(), etc } @RepositoryRestResource interface BlogRepository extends JpaRepository<Blog, Long> { }
  13. 17.

    @SpringBootApplication class NotesApplication fun main(args: Array<String>) { SpringApplication.run(NotesApplication::class.java, *args) }

    @Entity data class Note(@Id @GeneratedValue var id: Long? = null, var text: String? = null, @JsonIgnore var user: String? = null) @RepositoryRestResource interface NotesRepository : JpaRepository<Note, Long>
  14. 19.

    Latest trends in Web Development? Progressive Web Applications JavaScript MVC

    Frameworks Front-End Optimization REST and GraphQL APIs CSS Grid Micro Frontends
  15. 20.
  16. 21.
  17. 24.
  18. 28.

    @spring_io #springio17 JHipster jhipster.tech JHipster is a development platform to

    generate, develop and deploy Spring Boot + Angular/React Web applications and Spring microservices. and Vue! ✨
  19. 30.

    JHipster is Open Source Web Statistics, October 2019 376K Page

    Views / 653K on GitHub 121K Downloads GitHub Statistics 15K Stars 530 Contributors
  20. 31.

    JHipster Foundations Spring Boot Spring Security Angular or React Bootstrap

    Micrometer Maven or Gradle Authentication Type: cookie- based, JWT, or OAuth 2.0 / OIDC Type of Database: SQL or NoSQL Caching: EhCache or Hazelcast Elasticsearch Frameworks Project Options
  21. 32.

    How to use JHipster To install JHipster and Yeoman, use

    npm: npm install -g generator-jhipster Then create a directory and cd into it: mkdir myapp && cd myapp Then run JHipster: jhipster
  22. 33.

    Demo Time! Generate a basic blog application Look at its

    files and configuration Generate the CRUD entities Limit blogs to current user, allow HTML Deploy to … all in 20 minutes!
  23. 37.

    OAuth 2.0 and OpenID Connect OpenID Connect OAuth 2.0 HTTP

    OpenID Connect is for authentication OAuth 2.0 is for authorization
  24. 38.
  25. 41.

    The JHipster Mini-Book Written with Asciidoctor Quick and to the

    point, 164 pages Developed a Real World App: www.21-points.com Free Download from infoq.com/minibooks/jhipster-mini-book
  26. 42.

    Lines of Code in 21-Points 0 6500 13000 19500 26000

    Project Created Entities Generated Business Logic and UI 25,670 23,590 16,728
  27. 43.

    Project Creation Entities Generated Biz Logic and UI 0 10000

    20000 30000 2,999 2,648 1,839 9,472 8,911 5,523 8,383 7,696 5,892 Java TypeScript HTML Lines of Code by Language
  28. 46.

    What’s Next for JHipster? Full Reactive with WebFlux and Spring

    Cloud Gateway Spring Boot 2.2 GraphQL and Micro Frontends
  29. 48.

    Action! Try Spring Boot Try Angular, React, or Vue Try

    JHipster Explore PWAs Enjoy the bootiful experience!