Skip to content

Commit 17a685e

Browse files
authored
Merge pull request #444 from qq290584697/add_fix_bug_442_feature
fix bug 442,invoke producted method error
2 parents cf53b92 + 0e046d3 commit 17a685e

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)