Interface ServerSettingsRepository

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      java.util.Optional<ServerSettings> findByKey​(java.lang.String key)  
      java.lang.String generateSecret()  
      • Methods inherited from interface org.springframework.data.repository.CrudRepository

        count, delete, deleteAll, deleteAll, deleteById, existsById, findById, save
      • Methods inherited from interface org.springframework.data.jpa.repository.JpaRepository

        deleteAllInBatch, deleteInBatch, findAll, findAll, findAll, findAll, findAllById, flush, getOne, saveAll, saveAndFlush
      • Methods inherited from interface org.springframework.data.repository.PagingAndSortingRepository

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

        count, exists, findAll, findOne
    • Method Detail

      • generateSecret

        @Query(value="INSERT INTO server_settings (key, value) VALUES (\'secret.key\', gen_random_bytes(32)) RETURNING value",
               nativeQuery=true)
        java.lang.String generateSecret()
      • findByKey

        java.util.Optional<ServerSettings> findByKey​(java.lang.String key)