making autowired variables as beans for other classes