1. composer.json中:
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
{
  "require": {
    "workerman/gateway-worker": "^3.0",
    "workerman/mysql": "^1.0",
    "elasticsearch/elasticsearch": "~6.0",
    "ext-json": "*",
    "monolog/monolog": "^1.24",
    "guzzlehttp/guzzle": "^6.3"
  },
  "autoload": {
    "psr-4": {
      "Applications\\": "Applications/" //前面是命名空间,后边是真实目录
    }
  }
}