$ npm i egg-route-decorator --save
- Enable plugin in
config/plugin.js
exports.routeDecorator = {
enable: true,
package: 'egg-route-decorator',
};
- Edit your own configurations in
conif/config.{env}.js
exports.routeDecorator = {
};
- see config/config.default.js for more detail.
@HttpController(path?: string) 用于装饰控制器,表示当前路由控制器的公共前缀
@Get(path?: string) 装饰get请求
@Post(path?: string) 装饰post请求
@Put(path?: string) 装饰put请求
@Delete(path: string) 装饰Delete请求
Please open an issue here.