我跟随this tutorial和this one创建了一个带有Apigility的基本REST API,我不是Zend的专家,因为我的目标是在symfony2 app上构建api ,但就目前而言,在完成两个教程中的所有步骤之后,我达到了同一点,当访问http://api.example.com/endpoint1
时,我得到一个异常:
Zend\ServiceManager\Exception\ServiceNotCreatedException
File:
/var/www/api.example.com/zf-apigility-skeleton/vendor/zendframework/zendframework/library/Zend/ServiceManager/ServiceManager.php:1070
Message:
An abstract factory could not create an instance of exampleapiv1restprovinciacontroller(alias: ExampleAPI\V1\Rest\Provincia\Controller).
答案 0 :(得分:0)
查看运行网络服务器的用户是否在项目文件夹中有permission to write。
看看你是否disabled opcache and others code chaches(如APC)。
Apigility需要权限才能生成和更改/config
和/modules
文件夹中的文件。