app.js中使用升级生命周期函数，TypeError: Class constructor AppBootHook cannot be invoked without 'new'
## What happens?

使用类的方式定义 app.js，TypeError: Class constructor AppBootHook cannot be invoked without 'new'
--

16 |   | 08-20 19:16:44 | name: 'AppWorkerDiedError'
17 |   | 08-20 19:16:44 | at Process.ChildProcess._handle.onexit (internal/child_process.js:254:12)
18 |   | 08-20 19:16:44 | at ChildProcess.emit (events.js:197:13)
19 |   | 08-20 19:16:44 | at Object.onceWrapper (events.js:285:13)
20 |   | 08-20 19:16:44 | at ChildProcess.worker.process.once (internal/cluster/master.js:189:13)
21 |   | 08-20 19:16:44 | at EventEmitter.emit (events.js:202:15)
22 |   | 08-20 19:16:44 | at EventEmitter.cluster.on (/home/Service/node_modules/egg-cluster/lib/master.js:268:22)
23 |   | 08-20 19:16:44 | at Messenger.send (/home/Service/node_modules/egg-cluster/lib/utils/messenger.js:87:12)
24 |   | 08-20 19:16:44 | at Messenger.sendToMaster (/home/Service/node_modules/egg-cluster/lib/utils/messenger.js:122:17)
25 |   | 08-20 19:16:44 | at Master.emit (events.js:197:13)
26 |   | 08-20 19:16:44 | at Master.onAppExit (/home/Service/node_modules/egg-cluster/lib/master.js:391:21)
27 |   | 08-20 19:16:44 | 2020-08-20 19:16:44,460 ERROR 28 nodejs.AppWorkerDiedError: [master] app_worker#1:46 died (code: 1, signal: null, suicide: false, state: dead), current workers: ["2"]
28 |   | 08-20 19:16:44 | [2020-08-20 19:16:44.458] [cfork:master:28] worker:46 exit (code: 1, exitedAfterDisconnect: false, state: dead, isDead: true, isExpected: false, worker.disableRefork: true)
29 |   | 08-20 19:16:44 | 2020-08-20 19:16:44,457 INFO 28 [master] app_worker#1:46 disconnect, suicide: false, state: disconnected, current workers: ["1","2"]
30 |   | 08-20 19:16:44 | [2020-08-20 19:16:44.457] [cfork:master:28] don't fork, because worker:46 will be kill soon
31 |   | 08-20 19:16:44 | [2020-08-20 19:16:44.457] [cfork:master:28] worker:46 disconnect (exitedAfterDisconnect: false, state: disconnected, isDead: false, worker.disableRefork: true)
32 |   | 08-20 19:16:44 | at Module.load (internal/modules/cjs/loader.js:666:32)
33 |   | 08-20 19:16:44 | at Object.Module._extensions..js (internal/modules/cjs/loader.js:810:10)
34 |   | 08-20 19:16:44 | at Module._compile (internal/modules/cjs/loader.js:799:30)
35 |   | 08-20 19:16:44 | at Object.<anonymous> (/home/Service/node_modules/egg-cluster/lib/app_worker.js:13:13)
36 |   | 08-20 19:16:44 | at new Application (/home/Service/node_modules/egg/lib/application.js:65:19)
37 |   | 08-20 19:16:44 | at AppWorkerLoader.load (/home/Service/node_modules/egg/lib/loader/app_worker_loader.js:33:10)
38 |   | 08-20 19:16:44 | at AppWorkerLoader.loadCustomApp (/home/Service/node_modules/egg-core/lib/loader/mixin/custom.js:27:8)
39 |   | 08-20 19:16:44 | at Array.forEach (<anonymous>)
40 |   | 08-20 19:16:44 | at getLoadUnits.forEach.unit (/home/Service/node_modules/egg-core/lib/loader/mixin/custom.js:27:29)
41 |   | 08-20 19:16:44 | at AppWorkerLoader.loadFile (/home/Service/node_modules/egg-core/lib/loader/egg_loader.js:298:29)
42 |   | 08-20 19:16:44 | TypeError: Class constructor AppBootHook cannot be invoked without 'new'
43 |   | 08-20 19:16:44 |  
44 |   | 08-20 19:16:44 | ^
45 |   | 08-20 19:16:44 | throw e;
46 |   | 08-20 19:16:44 | /home/Service/node_modules/egg/lib/application.js:69



## Eggjs文档
![image](https://user-images.githubusercontent.com/25641980/90766559-51419d00-e31e-11ea-89b5-cce0e36be059.png)


## How To Reproduce

**Expected behavior**
1.willReady方法中,初始化dubbo
```
const dubbo = Dubbo.from({....})
   dubbo.subscribe({
            onTrace(msg) {
            console.log('dubbo subscribe trace msg:',msg);
            },
   });
   try {
         await dubbo.ready();
         console.log('dubbo was ready...');
   } catch (ex) {
         app.logger.error('dubbo.ready()失败', ex);
          console.log('error:dubbo.ready()失败',ex);
   }
```

## Context
- **Node Version**: v11.11.0
- **Egg Version**:v2.2.1
- **Plugin Name**:"dubbo2.js": "^2.3.9",
- **Plugin Version**:"dubbo2.js": "^2.3.9",
- **Platform**: 阿里云k8s容器
