I'm not sure, if this is a bug or not.

After switching spring boot version from 2.7.2 to 3.0.2, I started getting messages "Using deprecated '-debug' fallback for parameter name resolution. Compile the affected code with '-parameters' instead or avoid its introspection" for some of my repositories.

I created TestRepository and made sure that this method is the cause of my problem.

public interface TestRepository extends Repository<TestEntity, Long> {

    List<TestEntity> findByIdIn(List<Long> ids);
}

Using deprecated '-debug' fallback for parameter name resolution. Compile the affected code with '-parameters' instead or avoid its introspection: by.logvin.test.TestRepository



When I tried to add @Param with any text, the warning disappeared.

public interface TestRepository extends Repository<TestEntity, Long> {

    List<TestEntity> findByIdIn(@Param("anytext") List<Long> ids);
}

Does it make sense to have @Param in this method?

Comment From: bclozel

This is a deliberate behavior change introduced in #29531. This fallback will be removed in the future so a configuration change is required in your projects.

Enforcing the name attribute in annotations might be challenging in entire projects. I would suggest following the advice here and enable the "-parameters" compilation flag in your build file as it's easy to apply and doesn't require any code change.

Thanks!