11 lines
378 B
Kotlin
11 lines
378 B
Kotlin
package com.chantha.jdbc.security
|
|
|
|
import org.springframework.data.jpa.repository.Query
|
|
import org.springframework.data.repository.CrudRepository
|
|
import org.springframework.stereotype.Repository
|
|
|
|
@Repository
|
|
interface UserRepo : CrudRepository<User,Long>{
|
|
@Query("SELECT * FROM tb_user WHERE user_name = :user ",nativeQuery = true)
|
|
fun findByUsername(user:String):User
|
|
} |