Interface SettingRepository

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

@Repository @NullMarked public interface SettingRepository extends org.springframework.data.jpa.repository.JpaRepository<Setting,String>, org.springframework.data.jpa.repository.JpaSpecificationExecutor<Setting>

业务参数 进行数据库操作的 JPA 接口

提供业务参数实体的数据库访问接口,继承自Spring Data JPA的JpaRepository和JpaSpecificationExecutor。 支持基础的CRUD操作和复杂的规格查询,支持OData协议。

Author:
xezzon
  • Nested Class Summary

    Nested classes/interfaces inherited from interface org.springframework.data.jpa.repository.JpaSpecificationExecutor

    org.springframework.data.jpa.repository.JpaSpecificationExecutor.SpecificationFluentQuery<T>
  • 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.jpa.repository.JpaSpecificationExecutor

    count, count, delete, delete, exists, exists, findAll, findAll, findAll, findAll, findAll, findBy, findBy, findOne, findOne, update

    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

    • findByCode

      Optional<Setting> findByCode(String code)

      根据业务参数标识查询参数

      通过参数的唯一标识符code查询对应的配置项。 常用于根据参数标识快速获取参数配置的场景。

      Parameters:
      code - 业务参数标识,如 system.theme
      Returns:
      业务参数