Skip to content

Latest commit

 

History

History
22 lines (15 loc) · 701 Bytes

Param.md

File metadata and controls

22 lines (15 loc) · 701 Bytes

@Param Annotation

Indicates that the annotated parameter is a named parameter for a method or constructor.

Example usage:

public interface UserRepository extends BibernateRepository<User, Long> {
    User findByUsernameAndPassword(@Param("username") String username, @Param("password") String password);
}

In this example, the findByUsernameAndPassword method in the UserRepository interface is annotated with @Param for each parameter, indicating that they are named parameters. These named parameters are then used in the query method.

Parameters:

  • value: Specifies the name of the parameter.

See Also