Skip to content

Commit 0e046d3

Browse files
author
巨鹿
committed
fix bug 442,invoke producted method error
1 parent 63cbe92 commit 0e046d3

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

  • sofa-serverless-runtime/sofa-serverless-common/src/main/java/com/alipay/sofa/serverless/common/service

sofa-serverless-runtime/sofa-serverless-common/src/main/java/com/alipay/sofa/serverless/common/service/SpringServiceInvoker.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,10 @@ private Object invokeServiceCrossClassLoader(MethodInvocation invocation)
145145

146146
private Object invokeService(MethodInvocation invocation) throws InvocationTargetException,
147147
IllegalAccessException {
148-
return invocation.getMethod().invoke(target, invocation.getArguments());
148+
Method method = invocation.getMethod();
149+
//the method may be not public
150+
method.setAccessible(true);
151+
return method.invoke(target, invocation.getArguments());
149152
}
150153

151154
private Method getTargetMethod(Method method, Class<?>[] argumentTypes) {

0 commit comments

Comments
 (0)