问答详情
源自:4-5 控制器的初始化

使用method.invoke时有异常

java.lang.IllegalArgumentException: wrong number of arguments

sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)

sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

java.lang.reflect.Method.invoke(Method.java:498)

com.mooc.cwz.web.handler.MappingHandler.handle(MappingHandler.java:41)

com.mooc.cwz.web.servlet.DispatcherServlet.service(DispatcherServlet.java:25)

Note The full stack trace of the root cause is available in the server logs.


提问者:慕粉3320974 2020-04-23 20:48

个回答

  • qq_Forever浅唱此生_0
    2020-06-16 15:39:34

    反射方法的时候参数有问题啊,你这没有代码或者截图很难说问题诶