Spring Boot 4 · Controllers and beans

Create a repository

Get CRUD methods and derived queries without writing SQL.

public interface UserRepository extends JpaRepository<User, Long> {
    Optional<User> findByEmail(String email);
}

Official Spring Boot 4 documentation

More controllers and beans commands

All controllers and beans commands · Spring Boot 4 cheatsheet

Was this page helpful?