@@ -45,26 +45,53 @@ public Bind(HttpMethod method, String path) {
4545 if (methodWith != null )
4646 middlewares .addAll (Arrays .asList (methodWith .value ()));
4747
48-
49-
48+ // Registering HTTP-Method annotations.
49+ //region Registering HTTP-Method Annotations
5050 for (Get a : getAnnotations (Get .class , method )) {
5151 for (String s : a .value ()) {
5252 bindMiddlewares (HttpMethod .GET , globalPrefix , prefixes , s , middlewares );
5353 binds .add (new Bind (HttpMethod .GET , s ));
5454 }
5555 }
56+
5657 for (Post a : getAnnotations (Post .class , method )) {
57- bindMiddlewares (HttpMethod .POST , globalPrefix , prefixes , a .value (), middlewares );
58- binds .add (new Bind (HttpMethod .POST , a .value ()));
58+ for (String s : a .value ()) {
59+ bindMiddlewares (HttpMethod .POST , globalPrefix , prefixes , s , middlewares );
60+ binds .add (new Bind (HttpMethod .POST , s ));
61+ }
5962 }
63+
6064 for (Put a : getAnnotations (Put .class , method )) {
61- bindMiddlewares (HttpMethod .PUT , globalPrefix , prefixes , a .value (), middlewares );
62- binds .add (new Bind (HttpMethod .PUT , a .value ()));
65+ for (String s : a .value ()) {
66+ bindMiddlewares (HttpMethod .PUT , globalPrefix , prefixes , s , middlewares );
67+ binds .add (new Bind (HttpMethod .PUT , s ));
68+ }
6369 }
70+
71+
6472 for (Delete a : getAnnotations (Delete .class , method )) {
65- bindMiddlewares (HttpMethod .DELETE , globalPrefix , prefixes , a .value (), middlewares );
66- binds .add (new Bind (HttpMethod .DELETE , a .value ()));
73+ for (String s : a .value ()) {
74+ bindMiddlewares (HttpMethod .DELETE , globalPrefix , prefixes , s , middlewares );
75+ binds .add (new Bind (HttpMethod .DELETE , s ));
76+ }
77+ }
78+
79+
80+ for (Patch a : getAnnotations (Patch .class , method )) {
81+ for (String s : a .value ()) {
82+ bindMiddlewares (HttpMethod .PATCH , globalPrefix , prefixes , s , middlewares );
83+ binds .add (new Bind (HttpMethod .PATCH , s ));
84+ }
6785 }
86+
87+ for (Trace a : getAnnotations (Trace .class , method )) {
88+ for (String s : a .value ()) {
89+ bindMiddlewares (HttpMethod .TRACE , globalPrefix , prefixes , s , middlewares );
90+ binds .add (new Bind (HttpMethod .TRACE , s ));
91+ }
92+ }
93+ //endregion
94+
6895 if (binds .size () > 0 ) {
6996 BindHandler handler = new BindHandler (server , controller , method );
7097 for (String prefix : prefixes ) {
0 commit comments