Commit 7411681
committed
Support no-arg HandlerMethod and new beforeExecute #150
Call beforeExecute for no-arg HandlerMethod during preHandle and refactor advice dispatch. preHandle now throws Exception and detects HandlerMethod instances (Java pattern matching); when a handler method has no parameters it invokes beforeExecute immediately. Extracted a new beforeExecute(NativeWebRequest, HandlerMethod, Object...) to centralize invoking HandlerMethodAdvice.beforeExecuteMethod for all advices, and refactored the parameter-level beforeExecute to resolve arguments and delegate to the new method. Added ArrayUtils.isEmpty import and updated the test to declare throws Exception to match the changed signature.1 parent 88f3e0a commit 7411681
2 files changed
Lines changed: 20 additions & 10 deletions
File tree
- microsphere-spring-webmvc/src
- main/java/io/microsphere/spring/webmvc/method/support
- test/java/io/microsphere/spring/webmvc/method/support
Lines changed: 19 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
52 | 52 | | |
53 | 53 | | |
54 | 54 | | |
| 55 | + | |
55 | 56 | | |
56 | 57 | | |
57 | 58 | | |
| |||
166 | 167 | | |
167 | 168 | | |
168 | 169 | | |
169 | | - | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
170 | 177 | | |
171 | 178 | | |
172 | 179 | | |
| |||
300 | 307 | | |
301 | 308 | | |
302 | 309 | | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
303 | 320 | | |
304 | 321 | | |
305 | | - | |
306 | | - | |
307 | | - | |
308 | | - | |
309 | | - | |
310 | | - | |
311 | | - | |
312 | | - | |
| 322 | + | |
313 | 323 | | |
314 | 324 | | |
315 | 325 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
150 | 150 | | |
151 | 151 | | |
152 | 152 | | |
153 | | - | |
| 153 | + | |
154 | 154 | | |
155 | 155 | | |
156 | 156 | | |
| |||
0 commit comments