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 8484import org .springdoc .core .fn .RouterFunctionData ;
8585import org .springdoc .core .fn .RouterOperation ;
8686
87+ import org .springframework .aop .support .AopUtils ;
8788import org .springframework .beans .factory .ObjectFactory ;
8889import org .springframework .context .ApplicationContext ;
8990import org .springframework .core .annotation .AnnotatedElementUtils ;
@@ -424,14 +425,16 @@ protected void calculatePath(List<RouterOperation> routerOperationList) {
424425 if (routerOperation .getBeanClass () != null && !Void .class .equals (routerOperation .getBeanClass ())) {
425426 Object handlerBean = applicationContext .getBean (routerOperation .getBeanClass ());
426427 HandlerMethod handlerMethod = null ;
428+
427429 if (StringUtils .isNotBlank (routerOperation .getBeanMethod ())) {
428430 try {
429431 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 )
431434 .filter (method -> routerOperation .getBeanMethod ().equals (method .getName ()) && method .getParameters ().length == 0 )
432435 .findAny ();
433436 if (!methodOptional .isPresent ())
434- methodOptional = Arrays .stream (handlerBean . getClass (). getDeclaredMethods () )
437+ methodOptional = Arrays .stream (declaredMethods )
435438 .filter (method1 -> routerOperation .getBeanMethod ().equals (method1 .getName ()))
436439 .findAny ();
437440 if (methodOptional .isPresent ())
You can’t perform that action at this time.
0 commit comments