I'm getting an error in IntelliJ saying that it ca...
# spring
b
I'm getting an error in IntelliJ saying that it cannot autowire because no Beans of type RoleRepository exist (I'm using :
Copy code
@Autowired
    private var roleRepository: RoleRepository? = null
The application works properly, is there anything I can do about that?
s
Can you share the project to allow me to check?
(line may move, I am cleaning up the repo)
I think I was just not doing things properly.
i
Does it change if you use
Copy code
@Autowired
private lateinit var roleRepository: RoleRepository
You also get the added advantage of not having to use
!!
b
Will test that later today
I switched everything to lateinit already in other places and do not see it anymore
i
Great!