Interface UserRepository

All Superinterfaces:
org.springframework.data.repository.CrudRepository<User,String>, org.springframework.data.jpa.repository.JpaRepository<User,String>, org.springframework.data.repository.ListCrudRepository<User,String>, org.springframework.data.repository.ListPagingAndSortingRepository<User,String>, org.springframework.data.repository.PagingAndSortingRepository<User,String>, org.springframework.data.repository.query.QueryByExampleExecutor<User>, org.springframework.data.repository.Repository<User,String>

@Repository public interface UserRepository extends org.springframework.data.jpa.repository.JpaRepository<User,String>
Author:
xezzon
  • Method Summary

    Modifier and Type
    Method
    Description
    根据用户名获取记录

    Methods inherited from interface org.springframework.data.repository.CrudRepository

    count, delete, deleteAll, deleteAll, deleteAllById, deleteById, existsById, findById, save

    Methods inherited from interface org.springframework.data.jpa.repository.JpaRepository

    deleteAllByIdInBatch, deleteAllInBatch, deleteAllInBatch, deleteInBatch, findAll, findAll, flush, getById, getOne, getReferenceById, saveAllAndFlush, saveAndFlush

    Methods inherited from interface org.springframework.data.repository.ListCrudRepository

    findAll, findAllById, saveAll

    Methods inherited from interface org.springframework.data.repository.ListPagingAndSortingRepository

    findAll

    Methods inherited from interface org.springframework.data.repository.PagingAndSortingRepository

    findAll

    Methods inherited from interface org.springframework.data.repository.query.QueryByExampleExecutor

    count, exists, findAll, findBy, findOne
  • Method Details

    • findByUsername

      Optional<User> findByUsername(String username)
      根据用户名获取记录
      Parameters:
      username - 用户名
      Returns:
      用户记录