【问题标题】:Apigility basics: ServiceNotCreatedExceptionApigility 基础知识:ServiceNotCreatedException
【发布时间】:2014-07-10 12:26:40
【问题描述】:

我正在关注 this tutorialthis one 以使用 Apigility 创建一个基本的 REST API,我不是 Zend 专家,因为我的目标是在 symfony2 应用程序上构建 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).

【问题讨论】:

  • ExampleAPI\V1\Rest\Provincia\Controller\中应该有一个控制器和一个工厂类。请张贴。
  • 如果我在这个目录中只有 4 个文件怎么办?集合、实体、资源和资源工厂?没有任何控制器。

标签: php zend-framework zend-framework2 laminas-api-tools


【解决方案1】:

查看运行网络服务器的用户在项目文件夹中是否有permission to write

看看你有没有disabled opcache and others code chaches(比如APC)。

Apigility 需要权限来生成和更改 /config/modules 文件夹中的文件。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2014-04-16
    • 2018-05-25
    • 2014-11-28
    • 2014-02-14
    • 2023-04-10
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多