I have some code in my spring project as below
@Component
public class DatabaseAccessUtil
{
@Autowired
private DatabaseAccessor databaseAccessor;
}
My concern is how and why @Autowired annotation of spring work without setter method, example:
void setDatabaseAccessor(DatabaseAccessor databaseAccessor)
{
this.databaseAccessor = databaseAccessor;
}
where is spring's miracle? Thanks