BeanCreationException: I don't know how to define userRepo


class DataTable(private val param: MultiValueMap<String, String>, private val searchField: Array<String>) {
    private lateinit var userService: UserService

    private fun getAllCnt(): Int {
        return userService.countAll()


interface UserRepo: JpaRepository<User, Long> {
    @Query(value="SELECT COUNT(*) FROM users", nativeQuery=true)
    fun countAll(): Int


class UserService {
    private lateinit var userRepo: UserRepo

    fun countAll(): Int {
        return userRepo.countAll()


org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘userRepo’ defined in me.gureuso.admin.repository.UserRepo defined in @EnableJpaRepositories declared on JpaRepositoriesRegistrar.EnableJpaRepositoriesConfiguration: Invocation of init method failed; nested exception is java.lang.NoClassDefFoundError: kotlin/reflect/full/KClasses

maybe I think not define userRepo. but I don’t know how to define userRepo.