Howto initialize repository from ApplicationContext?

How to initialize a spring repository from org.springframework.context.ApplicationContext?

I tried (UsersRepository)context.getBean("UsersRepository"); However UsersRepository is not a Bean, it is a repository.

I tried getAutowireCapableBeanFactory().autowireBean(usersRepository); but does not work without constructing the class, However the repository can not be constructed.

I tried to declare @Transactional and @Autowired but this also does not work. the repository object is null.

I have the main object called core and into core have a usersession class and into usersession class have a function to verify the user into database, from controller pass the context to core and the core to usersession. I prevent pass the repository to from controller to core, other controllers dont use user session.