Replace @Query annotation by @NativeQuery when possible

MSAL

Replace @Query annotation by @NativeQuery when nativeQuery = true. @NativeQuery was introduced in Spring Data JPA 3.4.

org.openrewrite.java.spring.data.MigrateQueryToNativeQuery
mod run . --recipe=org.openrewrite.java.spring.data.MigrateQueryToNativeQuery

Install it once from Recipe actions, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.