lately I have asked a question about dsl config in this question Spring Boot and Kotlin DSL Configuration
After some more tests, I figured out that below class's userSignInService
is not autowired. The proxy does not have the actual instance to service wired to it.
bean<AppleUserSignInServiceImpl>(name = "appleUserSignInService")
bean<GoogleUserSignInServiceImpl>(name = "googleUserSignInService")
bean(name="googleSignInStrategy")
{
IndividualUserSignIn(
ref("googleUserSignInService"),
ref("userHibernateDAO"),
ref("socialAccountHibernateDAO"),
ref("userService"),
)
}
----------------------------------------------
open class IndividualUserSignIn constructor(
userSignInService: UserSignInService,
userDAO: UserDAO,
socialAccountDAO: SocialAccountDAO,
userService: UserService,
) : AbstractUserSignIn(
userSignInService,
userDAO,
socialAccountDAO,
userService,
----------------------------------------------
abstract class AbstractUserSignIn(
private val userSignInService: UserSignInService,
private val userDAO: UserDAO,
private val socialAccountDAO: SocialAccountDAO,
private val userService: UserService,
....
) {
@Transactional
open fun signIn(userSignInRequest: SignInRequest): SignInResult {...}
fun getSignInStrategy(): UserSignInStrategy{ // **(A)**
return userSignInService.getSignInStrategy()
}
}
If set these to lazy initialization like in Spring Boot and Kotlin DSL Configuration then it seems to be working but autowired IndividualUserSignIn
objects are not proxy