File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
springdoc-openapi-common/src/main/java/org/springdoc/api Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change 84
84
import org .springdoc .core .fn .RouterFunctionData ;
85
85
import org .springdoc .core .fn .RouterOperation ;
86
86
87
+ import org .springframework .aop .support .AopUtils ;
87
88
import org .springframework .beans .factory .ObjectFactory ;
88
89
import org .springframework .context .ApplicationContext ;
89
90
import org .springframework .core .annotation .AnnotatedElementUtils ;
@@ -424,14 +425,16 @@ protected void calculatePath(List<RouterOperation> routerOperationList) {
424
425
if (routerOperation .getBeanClass () != null && !Void .class .equals (routerOperation .getBeanClass ())) {
425
426
Object handlerBean = applicationContext .getBean (routerOperation .getBeanClass ());
426
427
HandlerMethod handlerMethod = null ;
428
+
427
429
if (StringUtils .isNotBlank (routerOperation .getBeanMethod ())) {
428
430
try {
429
431
if (ArrayUtils .isEmpty (routerOperation .getParameterTypes ())) {
430
- Optional <Method > methodOptional = Arrays .stream (handlerBean .getClass ().getDeclaredMethods ())
432
+ Method [] declaredMethods = AopUtils .getTargetClass (handlerBean ).getDeclaredMethods ();
433
+ Optional <Method > methodOptional = Arrays .stream (declaredMethods )
431
434
.filter (method -> routerOperation .getBeanMethod ().equals (method .getName ()) && method .getParameters ().length == 0 )
432
435
.findAny ();
433
436
if (!methodOptional .isPresent ())
434
- methodOptional = Arrays .stream (handlerBean . getClass (). getDeclaredMethods () )
437
+ methodOptional = Arrays .stream (declaredMethods )
435
438
.filter (method1 -> routerOperation .getBeanMethod ().equals (method1 .getName ()))
436
439
.findAny ();
437
440
if (methodOptional .isPresent ())
You can’t perform that action at this time.
0 commit comments