Fix singleton initialization in ApiServer/ApiDispatcher to make it work under Spring bootstraped environment