SlideShare una empresa de Scribd logo
1 de 40
Descargar para leer sin conexión
Ⓒ
2021 Grails Foundation. All rights reserved. grails.org
1
Ⓒ
2021 Grails Foundation. All rights reserved. grails.org
2
About Puneet
Puneet Behl is the Grails Development Lead at Object
Computing, Inc.
He is very enthusiastic about the Grails and Micronaut
frameworks, Groovy, Docker, and open source
technologies.
If you’d like to get in touch, feel free to say hello on
twitter.com/puneetbhl
Ⓒ
2021 Grails Foundation. All rights reserved. grails.org
3
AGENDA
● Introducing Grails Framework 5
● Upgrading
● Build and Infrastructure
● What Does Micronaut Integration Mean for You?
● Recent Updates
● The Road Ahead
Ⓒ
2021 Grails Foundation. All rights reserved. grails.org
4
Introducing
Grails
Framework 5
Ⓒ
2021 Grails Foundation. All rights reserved. grails.org
5
Dependent Libraries
● Apache Groovy 3
● Gradle 7.2
● Micronaut 3
● Spring framework 5.3
● Spring Boot 2.6
● Spock 2.0-groovy-3.0
Ⓒ
2021 Grails Foundation. All rights reserved. grails.org
6
Deprecations
The dot-based configuration access (i.e., grailsApplication.config.a.b.c) is
deprecated.
We recommend you use grailsApplication.config.getProperty(key, type).
Ⓒ
2021 Grails Foundation. All rights reserved. grails.org
7
JUnit5
● Running JUnit4 tests on JUnit Platform
● Annotation in org.junit.jupiter.api
● Assertions in org.junit.jupiter.api.Assertions
● @BeforeEach and @AfterEach
● @BeforeAll and @AfterAll
● junit-vintage-engine in runtime classpath
● Migrate from JUnit4
(https://junit.org/junit5/docs/current/user-guide/#migrating-from-junit4 )
Ⓒ
2021 Grails Foundation. All rights reserved. grails.org
8
Grails Gradle Plugin
The Grails Gradle Plugin was originally part of Grails Core; it has now been moved to a
separate repository.
The Grails Gradle plugin might not advance with the same speed as Grails Core. So, we
have added a separate Gradle property, grailsGradlePluginVersion
, to decouple it
from Grails Core version.
apply plugin:"org.grails.grails-web"
Ⓒ
2021 Grails Foundation. All rights reserved. grails.org
9
Semantic Versioning 2.0
Starting with version 4.0.0, the Grails framework follows semantic versioning 2.0.0 to make
the release process more predictable and simple.
https://semver.org/
Ⓒ
2021 Grails Foundation. All rights reserved. grails.org
10
Grails Plugins
● Most Grails plugins that work with Grails framework 4 should work with Grails
framework 5 as well.
● Building configuration instead of plugins.
Ⓒ
2021 Grails Foundation. All rights reserved. grails.org
11
JCenter and Bintray Shutdown
https://jfrog.com/blog/into-the-sunset-bintray-jcenter-gocenter-and-chartcenter/
Ⓒ
2021 Grails Foundation. All rights reserved. grails.org
12
Publishing Plugins
● The Grails Gradle Publish plugin is removed
● The Grails Profile Publish plugin is removed
● Instead use Gradle maven-publish plugin
● Include/update plugin in the Grails Plugin Portal
Ⓒ
2021 Grails Foundation. All rights reserved. grails.org
13
The Grails Wrapper Update
In June, the Grails Framework Artifactory instance was updated. As a result, the old Grails
wrapper now fails under certain conditions because the URL it uses to retrieve information is
no longer supported.
https://grails.org/blog/2021-06-10-grails-wrapper-update.html
Ⓒ
2021 Grails Foundation. All rights reserved. grails.org
14
Upgrading
Ⓒ
2021 Grails Foundation. All rights reserved. grails.org
15
Upgrading
● Grails framework 3 is EOL (end of life), so it's a good time to update your applications
and plugins
● Migrate tests from JUnit4 to JUnit5
● Change grailsVersion=5.1.0
● Remove any reference to jcenter()
● Update to Gradle 7.2
○ Run gradle help --scan
○ Execute gradle wrapper --gradle-version 7.2
● Gradle scope changes
Ⓒ
2021 Grails Foundation. All rights reserved. grails.org
16
Apache Groovy 3
● No more JDK warning with JDK 11 or higher
● Java 16 support
● New Parrot parser
● GDK additions: Several new extension methods
● Release Notes (https://groovy-lang.org/releasenotes/groovy-3.0.html#releasenotes)
Ⓒ
2021 Grails Foundation. All rights reserved. grails.org
17
GORM 7.1
● Apache Groovy 3
● Spring 5.3
● Spring 2.5.5
● Hibernate 5.5.7 (https://hibernate.org/orm/releases/5.5/ )
● MongoDB Driver Sync 4
(https://mongodb.github.io/mongo-java-driver/4.0/upgrading/)
● Neo4J Driver 4
Ⓒ
2021 Grails Foundation. All rights reserved. grails.org
18
Upgrading - Spring Boot Changes
● Hibernate Validator 6.2
(https://in.relation.to/2021/01/06/hibernate-validator-700-62-final-released/ )
● Environment Variable Prefix
● Metrics and endpoints
● Java 16
● Jetty 10 Support
● Configuration Changes
(https://github.com/spring-projects/spring-boot/wiki/Spring-Boot-2.5-Configuration-C
hangelog)
● Spring Boot 2.5 Release Notes
https://github.com/spring-projects/spring-boot/wiki/Spring-Boot-2.5-Release-Notes
Ⓒ
2021 Grails Foundation. All rights reserved. grails.org
19
Upgrading - Spring Changes
● Official support for Apache Groovy 3
● What's New in Spring Framework 5.x
https://github.com/spring-projects/spring-framework/wiki/What%27s-New-in-Spring-Fr
amework-5.x
Ⓒ
2021 Grails Foundation. All rights reserved. grails.org
20
Gradle 7.2
● Use mavenCentral()
or maven { url "https://repo.grails.org/grails/core" }
● The scope “provided” is removed.
● Apache Groovy 3
● Removal of Compile and Runtime Configurations
● Use maven-publish instead of maven
● Duplicate Strategy
● Upgrading from Gradle 5.x
https://docs.gradle.org/7.2/userguide/upgrading_version_5.html
● Gradle 7.2 Release Notes https://docs.gradle.org/7.2/release-notes.html
Ⓒ
2021 Grails Foundation. All rights reserved. grails.org
21
Gradle Scope Changes
compile api/implementation
compileOnly compileOnly
runtime runtimeOnly
testCompile testImplementation
testRuntime testRuntimeOnly
provided compileOnly/api
Ⓒ
2021 Grails Foundation. All rights reserved. grails.org
22
Micronaut 3
● The javax.inject annotations are no longer a transitive dependency. Micronaut now
ships with the Jakarta inject annotations. Either replace all javax.inject imports with
jakarta.inject, or add a dependency on javax-inject to continue using the older
annotations:
implementation("javax.inject:javax.inject:1")
● https://micronaut.io/2021/08/18/micronaut-framework-3-released/
Ⓒ
2021 Grails Foundation. All rights reserved. grails.org
23
Build and
Infrastructure
Ⓒ
2021 Grails Foundation. All rights reserved. grails.org
24
Build and Infrastructure
● Configured Gradle Enterprise (https://ge.grails.org) to improve Gradle build
● Moved from Travis to Github Workflows
● The artifacts are published to Maven Central
Ⓒ
2021 Grails Foundation. All rights reserved. grails.org
25
What Does
Micronaut
Integration
Mean For
You?
Ⓒ
2021 Grails Foundation. All rights reserved. grails.org
26
The Powerful Micronaut Declarative HTTP Client
● implementation("io.micronaut:micronaut-http-client")
@Client("https://start.grails.org")
interface GrailsAppForgeClient {
@Get("/{version}/profiles")
List<Map> profiles(String version)
}
Ⓒ
2021 Grails Foundation. All rights reserved. grails.org
27
Testing Security in the Application
when: 'login'
UserCredentials credentials = new UserCredentials(username: 'sherlock', password:
'elementary')
HttpRequest request = HttpRequest.POST('/api/login', credentials)
HttpResponse<BearerToken> resp = client.toBlocking().exchange(request, BearerToken)
resp = client.toBlocking().exchange(HttpRequest.GET('/api/announcements')
.header('Authorization', "Bearer ${resp.body().accessToken}"),
Argument.of(List, AnnouncementView))
then: 'announcement list'
rsp.status.code == 200
rsp.body() != null
((List)rsp.body()).size() == 1
Ⓒ
2021 Grails Foundation. All rights reserved. grails.org
28
Grails and Micronaut Kafka
import io.micronaut.configuration.kafka.annotation.KafkaClient
import io.micronaut.configuration.kafka.annotation.Topic
@KafkaClient
interface AnalyticsClient {
@Topic('analytics')
Map updateAnalytics(Map book)
}
Ⓒ
2021 Grails Foundation. All rights reserved. grails.org
29
Micronaut Features That Do Not Work With Grails
● Tracing
● Metrics
● Security
● CORS
● Open API
Ⓒ
2021 Grails Foundation. All rights reserved. grails.org
30
Recent
Releases
Ⓒ
2021 Grails Foundation. All rights reserved. grails.org
31
Grails Database Migration Plugin 4.0.0-RC2 Released
● Support Liquibase 4.6
● Liquibase Extension Upgrade Guide
(https://docs.liquibase.com/tools-integrations/extensions/extension-upgrade-guides/h
ome.html)
● Release Notes (https://github.com/liquibase/liquibase/releases/)
Ⓒ
2021 Grails Foundation. All rights reserved. grails.org
32
Grails 5.0.3 Released
● Bug-fixes and Improvements
● Make Grails 5 compatible with Gradle 7.2
● Fixed some bug around grails.factories file
● Release Notes (https://github.com/grails/grails-core/releases/tag/v5.0.3)
Ⓒ
2021 Grails Foundation. All rights reserved. grails.org
33
Log4J2 - CVE-202144228
● Grails®
framework blog post (https://grails.org/blog/2021-12-14-log4j2-cve.html)
● CVE-202144228 (https://nvd.nist.gov/vuln/detail/CVE-2021-44228)
Ⓒ
2021 Grails Foundation. All rights reserved. grails.org
34
The Road
Ahead
Ⓒ
2021 Grails Foundation. All rights reserved. grails.org
35
Grails Framework 5.1
● Spring Boot 2.6.1
● Micronaut 3.2
● Hibernate 5.6
● MongoDB Driver 4.4
● Better support with Gradle 7.2
Ⓒ
2021 Grails Foundation. All rights reserved. grails.org
36
● Improvements to the Grails CLI
● Spring Security Core Grails Plugin
Upcoming Changes
Ⓒ
2021 Grails Foundation. All rights reserved. grails.org
37
2GM Quarterly Town Hall Meeting
Each Town Hall Meeting is led by a panel of 2GM users, developers, and advocates.
Everyone in the 2GM communities is welcome and encouraged to participate.
https://objectcomputing.com/resources/events/2gm-town-hall
Next Meeting - Friday, January 7, 2022
Ⓒ
2021 Grails Foundation. All rights reserved. grails.org
38
Grails Foundation™
● A not-for-profit organization that supports and collectively leads the open source Grails
project.
● Supported by a Technology Advisory Board that ensures the Framework continues to
reflect and serve its diverse and growing user community.
● The Board meets quarterly to discuss and make recommendations regarding the Grails
framework roadmap and technical direction.
● For more information, check out https://grails.org/foundation/index.html.
Ⓒ
2021 Grails Foundation. All rights reserved. grails.org
39
Thank You
Community involvement is vital for the success of Grails framework. We appreciate the
Grails community for the support and feedback throughout this journey.
We are excited about this latest release. Please, upgrade your applications to Grails
framework 5. We would love to hear about your experience, and if you need any help with
your upgrade, we are here to support(https://grails.org/support.html) you.
Ⓒ
2021 Grails Foundation. All rights reserved. grails.org
40
Merry
Christmas!

Más contenido relacionado

La actualidad más candente

Perl 101 - The Basics of Perl Programming
Perl  101 - The Basics of Perl ProgrammingPerl  101 - The Basics of Perl Programming
Perl 101 - The Basics of Perl Programming
Utkarsh Sengar
 
Introduction To Single Page Application
Introduction To Single Page ApplicationIntroduction To Single Page Application
Introduction To Single Page Application
KMS Technology
 

La actualidad más candente (20)

Spring Native and Spring AOT
Spring Native and Spring AOTSpring Native and Spring AOT
Spring Native and Spring AOT
 
Spring Boot in Action
Spring Boot in Action Spring Boot in Action
Spring Boot in Action
 
Perl 101 - The Basics of Perl Programming
Perl  101 - The Basics of Perl ProgrammingPerl  101 - The Basics of Perl Programming
Perl 101 - The Basics of Perl Programming
 
D3 data visualization
D3 data visualizationD3 data visualization
D3 data visualization
 
Spring Cloud Function
Spring Cloud FunctionSpring Cloud Function
Spring Cloud Function
 
AngularJS for Beginners
AngularJS for BeginnersAngularJS for Beginners
AngularJS for Beginners
 
Asynchronous javascript
 Asynchronous javascript Asynchronous javascript
Asynchronous javascript
 
Spring Framework
Spring Framework  Spring Framework
Spring Framework
 
Spring Boot Actuator
Spring Boot ActuatorSpring Boot Actuator
Spring Boot Actuator
 
Introduction to Spring Framework
Introduction to Spring FrameworkIntroduction to Spring Framework
Introduction to Spring Framework
 
Spring Framework - AOP
Spring Framework - AOPSpring Framework - AOP
Spring Framework - AOP
 
Introduction To Single Page Application
Introduction To Single Page ApplicationIntroduction To Single Page Application
Introduction To Single Page Application
 
Angular 8
Angular 8 Angular 8
Angular 8
 
What Is Express JS?
What Is Express JS?What Is Express JS?
What Is Express JS?
 
Oracle E Business Suite Security Made Easy - Menus, Functions, Responsibiliti...
Oracle E Business Suite Security Made Easy - Menus, Functions, Responsibiliti...Oracle E Business Suite Security Made Easy - Menus, Functions, Responsibiliti...
Oracle E Business Suite Security Made Easy - Menus, Functions, Responsibiliti...
 
Making The Move To Java 17 (JConf 2022)
Making The Move To Java 17 (JConf 2022)Making The Move To Java 17 (JConf 2022)
Making The Move To Java 17 (JConf 2022)
 
‘go-to’ general-purpose sequential collections - from Java To Scala
‘go-to’ general-purpose sequential collections -from Java To Scala‘go-to’ general-purpose sequential collections -from Java To Scala
‘go-to’ general-purpose sequential collections - from Java To Scala
 
Spring boot
Spring bootSpring boot
Spring boot
 
Spring boot
Spring bootSpring boot
Spring boot
 
Presentation1.pptx
Presentation1.pptxPresentation1.pptx
Presentation1.pptx
 

Similar a What’s new in grails framework 5?

gitopsthekubernetesway-201026090439.pdf
gitopsthekubernetesway-201026090439.pdfgitopsthekubernetesway-201026090439.pdf
gitopsthekubernetesway-201026090439.pdf
saraichiba2
 
Contributing to Grails
Contributing to GrailsContributing to Grails
Contributing to Grails
GR8Conf
 
WTF is GitOps and Why You Should Care?
WTF is GitOps and Why You Should Care?WTF is GitOps and Why You Should Care?
WTF is GitOps and Why You Should Care?
Weaveworks
 

Similar a What’s new in grails framework 5? (20)

Grails 4: Upgrade your Game!
Grails 4: Upgrade your Game!Grails 4: Upgrade your Game!
Grails 4: Upgrade your Game!
 
What's New for GitLab CI/CD February 2020
What's New for GitLab CI/CD February 2020What's New for GitLab CI/CD February 2020
What's New for GitLab CI/CD February 2020
 
Grails 3.0 Preview
Grails 3.0 PreviewGrails 3.0 Preview
Grails 3.0 Preview
 
GitBucket: Open source self-hosting Git server built by Scala
GitBucket: Open source self-hosting Git server built by ScalaGitBucket: Open source self-hosting Git server built by Scala
GitBucket: Open source self-hosting Git server built by Scala
 
GeoServer Developers Workshop
GeoServer Developers WorkshopGeoServer Developers Workshop
GeoServer Developers Workshop
 
gitopsthekubernetesway-201026090439.pdf
gitopsthekubernetesway-201026090439.pdfgitopsthekubernetesway-201026090439.pdf
gitopsthekubernetesway-201026090439.pdf
 
Gitops: the kubernetes way
Gitops: the kubernetes wayGitops: the kubernetes way
Gitops: the kubernetes way
 
Spring Projects Infrastructure
Spring Projects InfrastructureSpring Projects Infrastructure
Spring Projects Infrastructure
 
Spring Projects Infrastructure
Spring Projects InfrastructureSpring Projects Infrastructure
Spring Projects Infrastructure
 
Drupal 8 and 9, Backwards Compatibility, and Drupal 8.5 update
Drupal 8 and 9, Backwards Compatibility, and Drupal 8.5 updateDrupal 8 and 9, Backwards Compatibility, and Drupal 8.5 update
Drupal 8 and 9, Backwards Compatibility, and Drupal 8.5 update
 
Keeping your build tool updated in a multi repository world
Keeping your build tool updated in a multi repository worldKeeping your build tool updated in a multi repository world
Keeping your build tool updated in a multi repository world
 
Contributing to Grails
Contributing to GrailsContributing to Grails
Contributing to Grails
 
JBoss EAP 7 & JDG 7 최신 기술 소개
JBoss EAP 7 & JDG 7 최신 기술 소개JBoss EAP 7 & JDG 7 최신 기술 소개
JBoss EAP 7 & JDG 7 최신 기술 소개
 
WTF is GitOps and Why You Should Care?
WTF is GitOps and Why You Should Care?WTF is GitOps and Why You Should Care?
WTF is GitOps and Why You Should Care?
 
WTF is GitOps & Why Should You Care?
WTF is GitOps & Why Should You Care?WTF is GitOps & Why Should You Care?
WTF is GitOps & Why Should You Care?
 
CIP Developing Curator Tool Wizards
CIP Developing Curator Tool WizardsCIP Developing Curator Tool Wizards
CIP Developing Curator Tool Wizards
 
How to plan and define your CI-CD pipeline
How to plan and define your CI-CD pipelineHow to plan and define your CI-CD pipeline
How to plan and define your CI-CD pipeline
 
Gitlab ci e kubernetes, build test and deploy your projects like a pro
Gitlab ci e kubernetes, build test and deploy your projects like a proGitlab ci e kubernetes, build test and deploy your projects like a pro
Gitlab ci e kubernetes, build test and deploy your projects like a pro
 
GraalVM and Oracle's Documentation Trends.pdf
GraalVM and Oracle's Documentation Trends.pdfGraalVM and Oracle's Documentation Trends.pdf
GraalVM and Oracle's Documentation Trends.pdf
 
How to manage Kubernetes at scale with just git
How to manage Kubernetes at scale with just git How to manage Kubernetes at scale with just git
How to manage Kubernetes at scale with just git
 

Último

EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
Earley Information Science
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
giselly40
 

Último (20)

From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 

What’s new in grails framework 5?

  • 1. Ⓒ 2021 Grails Foundation. All rights reserved. grails.org 1
  • 2. Ⓒ 2021 Grails Foundation. All rights reserved. grails.org 2 About Puneet Puneet Behl is the Grails Development Lead at Object Computing, Inc. He is very enthusiastic about the Grails and Micronaut frameworks, Groovy, Docker, and open source technologies. If you’d like to get in touch, feel free to say hello on twitter.com/puneetbhl
  • 3. Ⓒ 2021 Grails Foundation. All rights reserved. grails.org 3 AGENDA ● Introducing Grails Framework 5 ● Upgrading ● Build and Infrastructure ● What Does Micronaut Integration Mean for You? ● Recent Updates ● The Road Ahead
  • 4. Ⓒ 2021 Grails Foundation. All rights reserved. grails.org 4 Introducing Grails Framework 5
  • 5. Ⓒ 2021 Grails Foundation. All rights reserved. grails.org 5 Dependent Libraries ● Apache Groovy 3 ● Gradle 7.2 ● Micronaut 3 ● Spring framework 5.3 ● Spring Boot 2.6 ● Spock 2.0-groovy-3.0
  • 6. Ⓒ 2021 Grails Foundation. All rights reserved. grails.org 6 Deprecations The dot-based configuration access (i.e., grailsApplication.config.a.b.c) is deprecated. We recommend you use grailsApplication.config.getProperty(key, type).
  • 7. Ⓒ 2021 Grails Foundation. All rights reserved. grails.org 7 JUnit5 ● Running JUnit4 tests on JUnit Platform ● Annotation in org.junit.jupiter.api ● Assertions in org.junit.jupiter.api.Assertions ● @BeforeEach and @AfterEach ● @BeforeAll and @AfterAll ● junit-vintage-engine in runtime classpath ● Migrate from JUnit4 (https://junit.org/junit5/docs/current/user-guide/#migrating-from-junit4 )
  • 8. Ⓒ 2021 Grails Foundation. All rights reserved. grails.org 8 Grails Gradle Plugin The Grails Gradle Plugin was originally part of Grails Core; it has now been moved to a separate repository. The Grails Gradle plugin might not advance with the same speed as Grails Core. So, we have added a separate Gradle property, grailsGradlePluginVersion , to decouple it from Grails Core version. apply plugin:"org.grails.grails-web"
  • 9. Ⓒ 2021 Grails Foundation. All rights reserved. grails.org 9 Semantic Versioning 2.0 Starting with version 4.0.0, the Grails framework follows semantic versioning 2.0.0 to make the release process more predictable and simple. https://semver.org/
  • 10. Ⓒ 2021 Grails Foundation. All rights reserved. grails.org 10 Grails Plugins ● Most Grails plugins that work with Grails framework 4 should work with Grails framework 5 as well. ● Building configuration instead of plugins.
  • 11. Ⓒ 2021 Grails Foundation. All rights reserved. grails.org 11 JCenter and Bintray Shutdown https://jfrog.com/blog/into-the-sunset-bintray-jcenter-gocenter-and-chartcenter/
  • 12. Ⓒ 2021 Grails Foundation. All rights reserved. grails.org 12 Publishing Plugins ● The Grails Gradle Publish plugin is removed ● The Grails Profile Publish plugin is removed ● Instead use Gradle maven-publish plugin ● Include/update plugin in the Grails Plugin Portal
  • 13. Ⓒ 2021 Grails Foundation. All rights reserved. grails.org 13 The Grails Wrapper Update In June, the Grails Framework Artifactory instance was updated. As a result, the old Grails wrapper now fails under certain conditions because the URL it uses to retrieve information is no longer supported. https://grails.org/blog/2021-06-10-grails-wrapper-update.html
  • 14. Ⓒ 2021 Grails Foundation. All rights reserved. grails.org 14 Upgrading
  • 15. Ⓒ 2021 Grails Foundation. All rights reserved. grails.org 15 Upgrading ● Grails framework 3 is EOL (end of life), so it's a good time to update your applications and plugins ● Migrate tests from JUnit4 to JUnit5 ● Change grailsVersion=5.1.0 ● Remove any reference to jcenter() ● Update to Gradle 7.2 ○ Run gradle help --scan ○ Execute gradle wrapper --gradle-version 7.2 ● Gradle scope changes
  • 16. Ⓒ 2021 Grails Foundation. All rights reserved. grails.org 16 Apache Groovy 3 ● No more JDK warning with JDK 11 or higher ● Java 16 support ● New Parrot parser ● GDK additions: Several new extension methods ● Release Notes (https://groovy-lang.org/releasenotes/groovy-3.0.html#releasenotes)
  • 17. Ⓒ 2021 Grails Foundation. All rights reserved. grails.org 17 GORM 7.1 ● Apache Groovy 3 ● Spring 5.3 ● Spring 2.5.5 ● Hibernate 5.5.7 (https://hibernate.org/orm/releases/5.5/ ) ● MongoDB Driver Sync 4 (https://mongodb.github.io/mongo-java-driver/4.0/upgrading/) ● Neo4J Driver 4
  • 18. Ⓒ 2021 Grails Foundation. All rights reserved. grails.org 18 Upgrading - Spring Boot Changes ● Hibernate Validator 6.2 (https://in.relation.to/2021/01/06/hibernate-validator-700-62-final-released/ ) ● Environment Variable Prefix ● Metrics and endpoints ● Java 16 ● Jetty 10 Support ● Configuration Changes (https://github.com/spring-projects/spring-boot/wiki/Spring-Boot-2.5-Configuration-C hangelog) ● Spring Boot 2.5 Release Notes https://github.com/spring-projects/spring-boot/wiki/Spring-Boot-2.5-Release-Notes
  • 19. Ⓒ 2021 Grails Foundation. All rights reserved. grails.org 19 Upgrading - Spring Changes ● Official support for Apache Groovy 3 ● What's New in Spring Framework 5.x https://github.com/spring-projects/spring-framework/wiki/What%27s-New-in-Spring-Fr amework-5.x
  • 20. Ⓒ 2021 Grails Foundation. All rights reserved. grails.org 20 Gradle 7.2 ● Use mavenCentral() or maven { url "https://repo.grails.org/grails/core" } ● The scope “provided” is removed. ● Apache Groovy 3 ● Removal of Compile and Runtime Configurations ● Use maven-publish instead of maven ● Duplicate Strategy ● Upgrading from Gradle 5.x https://docs.gradle.org/7.2/userguide/upgrading_version_5.html ● Gradle 7.2 Release Notes https://docs.gradle.org/7.2/release-notes.html
  • 21. Ⓒ 2021 Grails Foundation. All rights reserved. grails.org 21 Gradle Scope Changes compile api/implementation compileOnly compileOnly runtime runtimeOnly testCompile testImplementation testRuntime testRuntimeOnly provided compileOnly/api
  • 22. Ⓒ 2021 Grails Foundation. All rights reserved. grails.org 22 Micronaut 3 ● The javax.inject annotations are no longer a transitive dependency. Micronaut now ships with the Jakarta inject annotations. Either replace all javax.inject imports with jakarta.inject, or add a dependency on javax-inject to continue using the older annotations: implementation("javax.inject:javax.inject:1") ● https://micronaut.io/2021/08/18/micronaut-framework-3-released/
  • 23. Ⓒ 2021 Grails Foundation. All rights reserved. grails.org 23 Build and Infrastructure
  • 24. Ⓒ 2021 Grails Foundation. All rights reserved. grails.org 24 Build and Infrastructure ● Configured Gradle Enterprise (https://ge.grails.org) to improve Gradle build ● Moved from Travis to Github Workflows ● The artifacts are published to Maven Central
  • 25. Ⓒ 2021 Grails Foundation. All rights reserved. grails.org 25 What Does Micronaut Integration Mean For You?
  • 26. Ⓒ 2021 Grails Foundation. All rights reserved. grails.org 26 The Powerful Micronaut Declarative HTTP Client ● implementation("io.micronaut:micronaut-http-client") @Client("https://start.grails.org") interface GrailsAppForgeClient { @Get("/{version}/profiles") List<Map> profiles(String version) }
  • 27. Ⓒ 2021 Grails Foundation. All rights reserved. grails.org 27 Testing Security in the Application when: 'login' UserCredentials credentials = new UserCredentials(username: 'sherlock', password: 'elementary') HttpRequest request = HttpRequest.POST('/api/login', credentials) HttpResponse<BearerToken> resp = client.toBlocking().exchange(request, BearerToken) resp = client.toBlocking().exchange(HttpRequest.GET('/api/announcements') .header('Authorization', "Bearer ${resp.body().accessToken}"), Argument.of(List, AnnouncementView)) then: 'announcement list' rsp.status.code == 200 rsp.body() != null ((List)rsp.body()).size() == 1
  • 28. Ⓒ 2021 Grails Foundation. All rights reserved. grails.org 28 Grails and Micronaut Kafka import io.micronaut.configuration.kafka.annotation.KafkaClient import io.micronaut.configuration.kafka.annotation.Topic @KafkaClient interface AnalyticsClient { @Topic('analytics') Map updateAnalytics(Map book) }
  • 29. Ⓒ 2021 Grails Foundation. All rights reserved. grails.org 29 Micronaut Features That Do Not Work With Grails ● Tracing ● Metrics ● Security ● CORS ● Open API
  • 30. Ⓒ 2021 Grails Foundation. All rights reserved. grails.org 30 Recent Releases
  • 31. Ⓒ 2021 Grails Foundation. All rights reserved. grails.org 31 Grails Database Migration Plugin 4.0.0-RC2 Released ● Support Liquibase 4.6 ● Liquibase Extension Upgrade Guide (https://docs.liquibase.com/tools-integrations/extensions/extension-upgrade-guides/h ome.html) ● Release Notes (https://github.com/liquibase/liquibase/releases/)
  • 32. Ⓒ 2021 Grails Foundation. All rights reserved. grails.org 32 Grails 5.0.3 Released ● Bug-fixes and Improvements ● Make Grails 5 compatible with Gradle 7.2 ● Fixed some bug around grails.factories file ● Release Notes (https://github.com/grails/grails-core/releases/tag/v5.0.3)
  • 33. Ⓒ 2021 Grails Foundation. All rights reserved. grails.org 33 Log4J2 - CVE-202144228 ● Grails® framework blog post (https://grails.org/blog/2021-12-14-log4j2-cve.html) ● CVE-202144228 (https://nvd.nist.gov/vuln/detail/CVE-2021-44228)
  • 34. Ⓒ 2021 Grails Foundation. All rights reserved. grails.org 34 The Road Ahead
  • 35. Ⓒ 2021 Grails Foundation. All rights reserved. grails.org 35 Grails Framework 5.1 ● Spring Boot 2.6.1 ● Micronaut 3.2 ● Hibernate 5.6 ● MongoDB Driver 4.4 ● Better support with Gradle 7.2
  • 36. Ⓒ 2021 Grails Foundation. All rights reserved. grails.org 36 ● Improvements to the Grails CLI ● Spring Security Core Grails Plugin Upcoming Changes
  • 37. Ⓒ 2021 Grails Foundation. All rights reserved. grails.org 37 2GM Quarterly Town Hall Meeting Each Town Hall Meeting is led by a panel of 2GM users, developers, and advocates. Everyone in the 2GM communities is welcome and encouraged to participate. https://objectcomputing.com/resources/events/2gm-town-hall Next Meeting - Friday, January 7, 2022
  • 38. Ⓒ 2021 Grails Foundation. All rights reserved. grails.org 38 Grails Foundation™ ● A not-for-profit organization that supports and collectively leads the open source Grails project. ● Supported by a Technology Advisory Board that ensures the Framework continues to reflect and serve its diverse and growing user community. ● The Board meets quarterly to discuss and make recommendations regarding the Grails framework roadmap and technical direction. ● For more information, check out https://grails.org/foundation/index.html.
  • 39. Ⓒ 2021 Grails Foundation. All rights reserved. grails.org 39 Thank You Community involvement is vital for the success of Grails framework. We appreciate the Grails community for the support and feedback throughout this journey. We are excited about this latest release. Please, upgrade your applications to Grails framework 5. We would love to hear about your experience, and if you need any help with your upgrade, we are here to support(https://grails.org/support.html) you.
  • 40. Ⓒ 2021 Grails Foundation. All rights reserved. grails.org 40 Merry Christmas!