
META-INF.rewrite.spring-data-upgrade-version.yml Maven / Gradle / Ivy
#
# Copyright 2021 the original author or authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
---
########################################################################################################################
# Spring Data 2.3
type: specs.openrewrite.org/v1beta/recipe
name: org.openrewrite.java.spring.data.UpgradeSpringData_2_3
displayName: Upgrade to Spring Data 2.3
description: 'Upgrade to Spring Data to 2.3 from any prior version.'
recipeList:
- org.openrewrite.java.spring.data.MigrateJpaSort
---
########################################################################################################################
# Spring Data 2.5
type: specs.openrewrite.org/v1beta/recipe
name: org.openrewrite.java.spring.data.UpgradeSpringData_2_5
displayName: Upgrade to Spring Data 2.5
description: 'Upgrade to Spring Data to 2.5 from any prior version.'
recipeList:
- org.openrewrite.java.spring.data.UseJpaRepositoryGetById
- org.openrewrite.java.spring.data.UseJpaRepositoryDeleteAllInBatch
---
type: specs.openrewrite.org/v1beta/recipe
name: org.openrewrite.java.spring.data.UseJpaRepositoryGetById
displayName: Use `JpaRepository#getById(ID id)`
description: '`JpaRepository#getOne(ID)` was deprecated in 2.5.'
recipeList:
- org.openrewrite.java.ChangeMethodName:
methodPattern: org.springframework.data.jpa.repository.JpaRepository getOne(..)
newMethodName: getById
---
type: specs.openrewrite.org/v1beta/recipe
name: org.openrewrite.java.spring.data.UseJpaRepositoryDeleteAllInBatch
displayName: Use `JpaRepository#deleteAllInBatch(Iterable entities)`
description: '`JpaRepository#deleteInBatch(Iterable)` was deprecated in 2.5.'
recipeList:
- org.openrewrite.java.ChangeMethodName:
methodPattern: org.springframework.data.jpa.repository.JpaRepository deleteInBatch(..)
newMethodName: deleteAllInBatch