Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Getting Started with the Micronaut Framework Br...

Getting Started with the Micronaut Framework Brighton Kotlin user group

Sergio del Amo

January 17, 2023
Tweet

More Decks by Sergio del Amo

Other Decks in Programming

Transcript

  1. Copyright © 2021 by Object Computing, Inc. (OCI). All rights

    reserved. Sergio del Amo https://sergiodelamo.com @sdelamo Member of the Micronaut Foundation Board of Directors Micronaut Lead Engineer at Object Computing Inc. Micronaut Developer Advocate Involved with Micronaut since its inception. Micronaut Core committer. Micronaut Guides. Micronaut Starter, Security, AWS, Views, RSS, Problem+JSON, Email, 3
  2. © 2022 Object Computing, Inc. (OCI) All rights reserved. No

    part of these notes may be reproduced, stored in a retrieval system, or transmitted, in any form or by any means, electronic, mechanical, photocopying, recording, or otherwise, without the prior, written permission of Object Computing, Inc. (OCI) INTRODUCTION
  3. Copyright © 2021 by Object Computing, Inc. (OCI). All rights

    reserved. Modern JVM Framework ❖ Micronaut was designed from scratch in 2017, focused on modern architectures like microservices and serverless, with the cloud in mind. 6 All application types ❖ Micronaut is a complete solution for any type of application: microservices, message-driven producers or consumers, command- line apps, serverless functions Highly optimized ❖ Micronaut leverages Java annotation processors and other optimizations to compute the framework infrastructure at compile- time, drastically reducing startup time and memory consumption.
  4. Copyright © 2022 by Object Computing, Inc. (OCI). All rights

    reserved. Release Schedule 7 • 3.8.0 - 2022 Dec • 3.7.0 - 2022 Sep • 3.6.0 - 2022 Aug • 3.5.0 - 2022 May • 3.4.0 - 2022 March • 3.3.0 - 2022 Jan • 3.2.0 - 2021 Nov • 3.1.0 - 2021 Oct • 3.0.0 - 2021 Aug • 2.5.0 - 2021 April • 2.4.0 - 2021 March • 2.3.0 - 2021 Jan • 2.2.0 - 2020 Nov • 2.1.0 - 2020 Oct • 2.0.0 - 2020 Jun • 1.3.0 - 2020 Feb • 1.2.0 - 2019 Aug • 1.1.0 - 2019 April • 1.0.0 - 2018 Oct 1 Year - Mayor 6 Week - Minor 1-2 Week - Patch
  5. Copyright © 2021 by Object Computing, Inc. (OCI). All rights

    reserved. AOT: Ahead of Time Micronaut computes at build time: ‣ All dependency and configuration injection ‣ Annotation metadata (meta annotations) ‣ AOP proxies ‣ Bean introspections ‣ All other framework infrastructure At runtime ‣ No reflection. ‣ No proxy generation. ‣ No dynamic classloading. ‣ No classpath scanning. 8
  6. Copyright © 2021 by Object Computing, Inc. (OCI). All rights

    reserved. Configuration Dependency Injection ❖ Can use JSR-330 (@Inject) annotations 9 ❖ Properties, YAML, TOML, Groovy, Config4K. Validation support ❖ Built-in reflection free, faster startup, smaller JAR, reduced memory. ❖ Hibernate Validation: full Bean Validation API compliance. AOP: Aspect-Oriented Programing ❖ Compile-time, reflection free. HTTP Client ❖ Micronaut includes an HTTP client that has both a low-level API and a higher-level AOP-driven API.
  7. © 2022 Object Computing, Inc. (OCI) All rights reserved. No

    part of these notes may be reproduced, stored in a retrieval system, or transmitted, in any form or by any means, electronic, mechanical, photocopying, recording, or otherwise, without the prior, written permission of Object Computing, Inc. (OCI) DEMO
  8. Copyright © 2021 by Object Computing, Inc. (OCI). All rights

    reserved. GraalVM Native Executable 15
  9. Copyright © 2022 by Object Computing, Inc. (OCI). All rights

    reserved. ❖ RxJava 2 ❖ RxJava 3 ❖ Project Reactor Reactive Library Agnostic 16
  10. Copyright © 2022 by Object Computing, Inc. (OCI). All rights

    reserved. Micronaut Runtimes 19 Servlet
  11. Copyright © 2022 by Object Computing, Inc. (OCI). All rights

    reserved. Micronaut Views 23 Server Side View Redendering Pebble Rocker Soy
  12. Copyright © 2022 by Object Computing, Inc. (OCI). All rights

    reserved. Micronaut Security 24 Security OAuth 2.0 OpenID Connect LDAP BasicAuth JWT
  13. Copyright © 2021 by Object Computing, Inc. (OCI). All rights

    reserved. Error Handling ❖ Vnd.Error ❖ Problem+JSON 25
  14. Copyright © 2021 by Object Computing, Inc. (OCI). All rights

    reserved. Monitoring ❖ Micrometer ❖ JMX ❖ Elasticsearch 28 API ❖ GRAPHQL ❖ GRPC ❖ Open API Containers ❖ Kubernetes K8S MISC ❖ Cache ❖ Email ❖ Picocli ❖ RSS
  15. Copyright © 2021 by Object Computing, Inc. (OCI). All rights

    reserved. Micronaut Resources ❖ micronaut.io/launch ❖ micronaut.io/docs ❖ micronaut.io/guides ❖ micronaut.io/blog ❖ micronaut.io/category/webinar ❖ micronaut.io/resources/community-support ❖ github.com/micronaut-projects/micronaut-core ❖ micronaut.io/foundation ❖ micronaut.io/commercial-support ❖ objectcomputing.com/products/micronautsolutions 29
  16. © 2022 Object Computing, Inc. (OCI) All rights reserved. No

    part of these notes may be reproduced, stored in a retrieval system, or transmitted, in any form or by any means, electronic, mechanical, photocopying, recording, or otherwise, without the prior, written permission of Object Computing, Inc. (OCI) OCI Contact Information Sergio del Amo Caballero OCI Micronaut Core Development Team [email protected] Jen Wiese Community Engagement Manager [email protected] (314) 579-0066 micronaut.io