protected function getEntityConf($entity)
    {
        $entityClass = get_class($entity);
        if($this->init === false){
            $this->boot();
        }
        if(preg_match('/'. \Doctrine\Common\Persistence\Proxy::MARKER .'/',$entityClass)){
            $entityClass = \Doctrine\Common\Util\ClassUtils::getRealClass($entityClass);
        }
        if(!isset($this->configsObjects[$entityClass])){
            $itemClassLoaded = [];
            foreach ($this->linkGeneratorItems as $linkGeneratorItem){
                $itemClassLoaded[] = get_class($linkGeneratorItem);
            }
            throw new Exception(sprintf('The config for entity "%s", not defined. Please define in LinkGeneratorItem already load (%s)',$entityClass,  implode(",",$itemClassLoaded)));
        }
        return $this->configsObjects[$entityClass];
    }