4Manuals

  • PDF Cloud HOME

Symfony / API平台无法达到目标 Download

    碳日期差异方法在Laravel 5.7中给出了错误的日期差异 如何使用PHP将https错误状态设置为404,以便可以通过.htaccess文件处理? 通过dropzone laravel通过电子邮件发送多个图像 Symfony 3.4安装新软件包时发生冲突 通过键合并两个数组,并将值附加到另一个数组中 电子邮件字段为空 如何在TCPDF中添加Jameel Noori Nastaleeq字体? 如何取消发布PHP Artisan Laravel模块 使用tomcat调用JavaBridge时获取404 如何在PHP中控制缓存

我正在使用symfony和API平台设置项目,如果我在控制台中运行路由调试器,则可以看到我的新路由:

 --------------------------- -------- -------- ------ ------------------------------------- 
 Name                        Method   Scheme   Host   Path                                 
 --------------------------- -------- -------- ------ ------------------------------------- 
 _preview_error              ANY      ANY      ANY    /_error/{code}.{_format}             
 api_entrypoint              ANY      ANY      ANY    /api/{index}.{_format}               
 api_doc                     ANY      ANY      ANY    /api/docs.{_format}                  
 api_jsonld_context          ANY      ANY      ANY    /api/contexts/{shortName}.{_format}  
 api_users_get_collection    GET      ANY      ANY    /api/users.{_format}                 
 api_users_post_collection   POST     ANY      ANY    /api/users.{_format}                 
 api_users_get_item          GET      ANY      ANY    /api/users/{id}.{_format}            
 api_users_delete_item       DELETE   ANY      ANY    /api/users/{id}.{_format}            
 api_users_put_item          PUT      ANY      ANY    /api/users/{id}.{_format}            
 api_users_patch_item        PATCH    ANY      ANY    /api/users/{id}.{_format}            
 --------------------------- -------- -------- ------ ------------------------------------- 

但是,我在浏览器中看不到它们。如果我转到http://localhost,则可以看到symsony4主页;如果我转到http://localhost/api,则将看到“未找到错误”。

这是调试api_entrypoint路由时的输出

+--------------+------------------------------------------------------------+
| Property     | Value                                                      
|
+--------------+------------------------------------------------------------+
| Route Name   | api_entrypoint                                             
|
| Path         | /api/{index}.{_format}                                     
|
| Path Regex   | #^/api(?:/(?P<index>index)(?:\.(?P<_format>[^/]++))?)?$#sD |
| Host         | ANY                                                        
|
| Host Regex   |                                                            
|
| Scheme       | ANY                                                        
|
| Method       | ANY                                                        
|
| Requirements | index: index                                               
|
| Class        | Symfony\Component\Routing\Route                            
|
| Defaults     | _api_respond: true                                         
|
|              | _controller: api_platform.action.entrypoint                
|
|              | _format:                                                   
|
|              | index: index                                               
|
| Options      | compiler_class: Symfony\Component\Routing\RouteCompiler    |
+--------------+------------------------------------------------------------+

0 个答案:

没有答案



Similar searches
    如何在我的AOSP映像中添加/导入驱动程序? 如何从查询集结果中获取列名cx_oracle django SCRIPT5007:无法获取属性'keypress'的值:对象为null或未定义 我不明白为什么JavaScript中的某些箭头功能的行为不像常规的箭头功能 如何在R中过滤出负面数据