流明中的DarkanLine swagger集成未注册swagger\Lume::ServiceProvider

流明中的DarkanLine swagger集成未注册swagger\Lume::ServiceProvider,swagger,lumen,service-provider,Swagger,Lumen,Service Provider,我正试图将昂首阔步融入穆鲁门项目。流明版本为5.7 在我的本地系统中,它工作正常,但在服务器(Ubuntu)中,由于内存问题,我无法遵循该命令,因此我将供应商文件夹、composer.json和composer.lock文件从本地上传到服务器,并运行composer dump autoload命令 我遵循此文档进行了swagger集成 然后在我的终端中运行php artisan swagger lume:publish 但是我有 在aplication.php第183行中找不到类“Swagge

我正试图将昂首阔步融入穆鲁门项目。流明版本为5.7 在我的本地系统中,它工作正常,但在服务器(Ubuntu)中,由于内存问题,我无法遵循该命令,因此我将供应商文件夹、composer.json和composer.lock文件从本地上传到服务器,并运行composer dump autoload命令

我遵循此文档进行了swagger集成

然后在我的终端中运行php artisan swagger lume:publish

但是我有

在aplication.php第183行中找不到类“SwaggerLume\ServiceProvider”

在此之前,我已经像下面那样配置了bootstrap/app.php文件

未注释的$app->withFacades();并添加了$app->configure('swagger-lume');在注册容器绑定之前。我添加了$app->register(\SwaggerLume\ServiceProvider::class);内部注册服务提供商

<?php

 require_once __DIR__.'/../vendor/autoload.php';

 try {
  (new Dotenv\Dotenv(__DIR__.'/../'))->load();
 } catch (Dotenv\Exception\InvalidPathException $e) {
//
}

 /*
   |--------------------------------------------------------------------------
   | Create The Application
   |--------------------------------------------------------------------------
   |
   | Here we will load the environment and create the application instance
   | that serves as the central piece of this framework. We'll use this
   | application as an "IoC" container and router for this framework.
   |
 */

  $app = new Laravel\Lumen\Application(
  realpath(__DIR__.'/../')
  );

  $app->withFacades();

  $app->withEloquent();

  $app->configure('swagger-lume');

 /*
 |--------------------------------------------------------------------------
 | Register Container Bindings
 |--------------------------------------------------------------------------
 |
 | Now we will register a few bindings in the service container. We will
 | register the exception handler and the console kernel. You may add
 | your own bindings here if you like or you can make another file.
 |
 */

 $app->singleton(
  Illuminate\Contracts\Debug\ExceptionHandler::class,
  App\Exceptions\Handler::class
 );

 $app->singleton(
  Illuminate\Contracts\Console\Kernel::class,
  App\Console\Kernel::class
);

/*
|--------------------------------------------------------------------------
| Register Middleware
|--------------------------------------------------------------------------
|
| Next, we will register the middleware with the application. These can
| be global middleware that run before and after each request into a
| route or middleware that'll be assigned to some specific routes.
|
*/


$app->routeMiddleware([
'auth' => App\Http\Middleware\Authenticate::class,
]);

/*
 |--------------------------------------------------------------------------
 | Register Service Providers
 |--------------------------------------------------------------------------
 |
 | Here we will register all of the application's service providers which
 | are used to bind services into the container. Service providers are
 | totally optional, so you are not required to uncomment this line.
 |
 $app->register(App\Providers\AuthServiceProvider::class);
 $app->register(\SwaggerLume\ServiceProvider::class);