Skip to content

Instantly share code, notes, and snippets.

@aronbalog
Last active July 26, 2019 19:25
Show Gist options
  • Save aronbalog/e6205803dd492fc29212bba5c9a4449e to your computer and use it in GitHub Desktop.
Save aronbalog/e6205803dd492fc29212bba5c9a4449e to your computer and use it in GitHub Desktop.
package com.example.demo.dao
import com.example.demo.repository.PersonRepository
import org.springframework.stereotype.Component
@Component
class PersonDao(
private val personRepository: PersonRepository
) {
fun getPersonById(id: String) =
personRepository.findById(id)
fun getPersonsByName(name: String) =
personRepository.findByNameLike(name)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment