Hi guys I'm having issues with the mapstruct mappe...
# server
a
Hi guys I'm having issues with the mapstruct mapper in springboot
Copy code
@Mapper
@Component
interface UserMapper {
    fun toUserDTO(user: User): UserDTO
    fun toListOfUserDTO(users: List<User>) : List<UserDTO>
    fun toUser(userDTO: UserDTO) : User
    fun toListOfUser(userDTOs: List<UserDTO>) : List<User>
}
and i'm using it in my contoller
Copy code
@Autowired
lateinit var userMapper: UserMapper
It gives this error, please help
***************************
APPLICATION FAILED TO START *************************** Description: Field userMapper in com.scienta.backend_rated_ng.controller.AuthController required a bean of type 'com.scienta.backend_rated_ng.mapper.UserMapper' that could not be found. The injection point has the following annotations: - @org.springframework.beans.factory.annotation.Autowired(required=true) Action: Consider defining a bean of type 'com.scienta.backend_rated_ng.mapper.UserMapper' in your configuration.
d
maybe #spring ?
a
okay, thanks