vendredi 15 mai 2020

Spring JPA scan user implementations of generic interface

I wanna write some starter for spring data JPA. I have an interface on kotlin:

interface Converter<ResultType> {
fun convertList(values: List<String>): List<ResultType> {
    return values.map { convert(it) }
   }
    fun convert(value: String): ResultType
}

And scan of implementation of this interface from user(app which will use my starter) package to Map. My questions:

  1. How do know which package I should scan(Ideally without asking user add some property)
  2. And how to build Map i am thinking about using reflection. Have i other options?

And yes, i dont need examples i need some reccomendations about best practices? Thank you!





Aucun commentaire:

Enregistrer un commentaire