diff --git a/annotation/request-mapping.go b/annotation/request-mapping.go new file mode 100644 index 0000000..b862365 --- /dev/null +++ b/annotation/request-mapping.go @@ -0,0 +1,20 @@ +package annotation + +import ( + "reflect" + + cda "git.loafle.net/commons/di-go/annotation" +) + +var RequestMappingAnnotationType = reflect.TypeOf((*RequestMappingAnnotation)(nil)) + +func init() { + cda.RegisterAnnotation(RequestMappingAnnotationType) +} + +type RequestMappingAnnotation struct { + cda.TypeAnnotation `@annotation:"@overflow:RequestMapping"` + Method string `@annotation:"method"` + Entry string `@annotation:"entry"` + Params []string `@annotation:"params"` +} diff --git a/annotation/rest-service.go b/annotation/rest-service.go index cc2e0ad..7ef6ecb 100644 --- a/annotation/rest-service.go +++ b/annotation/rest-service.go @@ -14,7 +14,4 @@ func init() { type RESTServiceAnnotation struct { cda.TypeAnnotation `@annotation:"@overflow:RESTService"` - Method string `@annotation:"method"` - Entry string `@annotation:"entry"` - Params []string `@annotation:"params"` }