Pass Function instances to PropertyMapper.Source#as as method references

Proprietary

Spring Boot 4 changed PropertyMapper.Source#as and #asInt to take a Source.Adapter rather than a Function. A Function held in a variable, field or returned by a method is passed as its apply method reference, which compiles against both. Lambdas and method references are left as they are.

io.moderne.java.spring.boot4.MigratePropertyMapperFunctionToAdapter
mod run . --recipe=io.moderne.java.spring.boot4.MigratePropertyMapperFunctionToAdapter

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