Issue 1:
Environment

Dubbo version: 2.7.3-SNAPSHOT

Operating System version: macOS

Java version: java8、java12

Steps to reproduce this issue

引入redis服务：

在dubbo-consumer.xml中定义

<dubbo:reference id="store" interface="java.util.Map" url="redis://127.0.0.1:6379" />

使用该服务：

ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext("spring/dubbo-consumer.xml");
Map map = context.getBean("store", Map.class);
map.put("test", "123");
System.out.println(map.get("test"));

在java8环境下启动consumer应用一切正常。

在java12环境下启动consumer应用异常，异常信息如下：

[20/08/19 14:39:05:065 CST] main WARN config.AbstractConfig: [DUBBO] There's no valid metadata config found, if you are using the simplified mode of registry url, please make sure you have a metadata address configured properly., dubbo version: , current host: 192.168.0.169
[20/08/19 14:39:05:140 CST] main INFO common.Version: [DUBBO] No codeSource for class java.util.Map when getVersion, use default version null, dubbo version: , current host: 192.168.0.169
[20/08/19 14:39:06:183 CST] main INFO config.AbstractConfig: [DUBBO] Refer dubbo service java.util.Map from url redis://127.0.0.1:6379/java.util.Map?application=demo-consumer&dubbo=2.0.2&interface=java.util.Map&lazy=false&methods=getOrDefault,ofEntries,values,computeIfAbsent,replace,replaceAll,remove,put,containsValue,compute,hashCode,get,of,merge,putAll,keySet,entrySet,forEach,containsKey,clear,isEmpty,copyOf,entry,computeIfPresent,size,equals,putIfAbsent&pid=15822&qos-port=33333&register.ip=192.168.0.169&side=consumer&sticky=false&timestamp=1566283145066, dubbo version: , current host: 192.168.0.169
Exception in thread "main" org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'store': FactoryBean threw exception on object creation; nested exception is java.lang.RuntimeException: [source error] not available in a static method: handler
at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.doGetObjectFromFactoryBean(FactoryBeanRegistrySupport.java:177)
at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.getObjectFromFactoryBean(FactoryBeanRegistrySupport.java:103)
at org.springframework.beans.factory.support.AbstractBeanFactory.getObjectForBeanInstance(AbstractBeanFactory.java:1640)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:254)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202)
at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1086)
at org.apache.dubbo.demo.consumer.Application.main(Application.java:38)
Caused by: java.lang.RuntimeException: [source error] not available in a static method: handler
at org.apache.dubbo.common.bytecode.ClassGenerator.toClass(ClassGenerator.java:348)
at org.apache.dubbo.common.bytecode.ClassGenerator.toClass(ClassGenerator.java:287)
at org.apache.dubbo.common.bytecode.Proxy.getProxy(Proxy.java:192)
at org.apache.dubbo.common.bytecode.Proxy.getProxy(Proxy.java:66)
at org.apache.dubbo.rpc.proxy.javassist.JavassistProxyFactory.getProxy(JavassistProxyFactory.java:35)
at org.apache.dubbo.rpc.proxy.AbstractProxyFactory.getProxy(AbstractProxyFactory.java:68)
at org.apache.dubbo.rpc.proxy.AbstractProxyFactory.getProxy(AbstractProxyFactory.java:37)
at org.apache.dubbo.rpc.proxy.wrapper.StubProxyFactoryWrapper.getProxy(StubProxyFactoryWrapper.java:72)
at org.apache.dubbo.rpc.ProxyFactory$Adaptive.getProxy(ProxyFactory$Adaptive.java)
at org.apache.dubbo.config.ReferenceConfig.createProxy(ReferenceConfig.java:433)
at org.apache.dubbo.config.ReferenceConfig.init(ReferenceConfig.java:329)
at org.apache.dubbo.config.ReferenceConfig.get(ReferenceConfig.java:250)
at org.apache.dubbo.config.spring.ReferenceBean.getObject(ReferenceBean.java:73)
at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.doGetObjectFromFactoryBean(FactoryBeanRegistrySupport.java:170)
... 6 more
Caused by: javassist.CannotCompileException: [source error] not available in a static method: handler
at javassist.CtNewMethod.make(CtNewMethod.java:79)
at javassist.CtNewMethod.make(CtNewMethod.java:45)
at org.apache.dubbo.common.bytecode.ClassGenerator.toClass(ClassGenerator.java:323)
... 19 more
Caused by: compile error: not available in a static method: handler
at javassist.compiler.MemberCodeGen.fieldAccess(MemberCodeGen.java:1037)
at javassist.compiler.MemberCodeGen.atFieldRead(MemberCodeGen.java:867)
at javassist.compiler.MemberCodeGen.atMember(MemberCodeGen.java:862)
at javassist.compiler.JvstCodeGen.atMember(JvstCodeGen.java:112)
at javassist.compiler.ast.Member.accept(Member.java:39)
at javassist.compiler.MemberCodeGen.atCallExpr(MemberCodeGen.java:510)
at javassist.compiler.JvstCodeGen.atCallExpr(JvstCodeGen.java:244)
at javassist.compiler.ast.CallExpr.accept(CallExpr.java:46)
at javassist.compiler.CodeGen.atAssignCore(CodeGen.java:877)
at javassist.compiler.CodeGen.atVariableAssign(CodeGen.java:810)
at javassist.compiler.CodeGen.atDeclarator(CodeGen.java:744)
at javassist.compiler.ast.Declarator.accept(Declarator.java:100)
at javassist.compiler.CodeGen.atStmnt(CodeGen.java:351)
at javassist.compiler.ast.Stmnt.accept(Stmnt.java:50)
at javassist.compiler.CodeGen.atStmnt(CodeGen.java:351)
at javassist.compiler.ast.Stmnt.accept(Stmnt.java:50)
at javassist.compiler.CodeGen.atMethodBody(CodeGen.java:292)
at javassist.compiler.CodeGen.atMethodDecl(CodeGen.java:274)
at javassist.compiler.ast.MethodDecl.accept(MethodDecl.java:44)
at javassist.compiler.Javac.compileMethod(Javac.java:169)
at javassist.compiler.Javac.compile(Javac.java:95)
at javassist.CtNewMethod.make(CtNewMethod.java:74)
... 21 more
[20/08/19 14:39:06:298 CST] Thread-0 INFO support.ClassPathXmlApplicationContext: Closing org.springframework.context.support.ClassPathXmlApplicationContext@1134affc: startup date [Tue Aug 20 14:39:02 CST 2019]; root of context hierarchy
[20/08/19 14:39:06:302 CST] Thread-0 INFO support.AbstractRegistryFactory: [DUBBO] Close all registries [], dubbo version: , current host: 192.168.0.169

Expected Result

java12中也能正常使用

Actual Result

出现异常，异常信息见上文

分析

异常原因是Dubbo在对java.util.Map进行代理时，使用javassit对每个方法进行代理，在java9之前，Map接口中是没有static方法的，而之后新增了一些static方法，现在代理逻辑里没有处理static方法的代理逻辑，导致代理时出现异常。

Issue 2:
In jdk8 the interface supports static method.

The compilation of static methods should be excluded when generating the proxy.

If not excluded, the following exception will be thrown：

Caused by: compile error: not available in a static method: handler
at javassist.compiler.MemberCodeGen.fieldAccess(MemberCodeGen.java:1037)
at javassist.compiler.MemberCodeGen.atFieldRead(MemberCodeGen.java:867)
at javassist.compiler.MemberCodeGen.atMember(MemberCodeGen.java:862)
at javassist.compiler.JvstCodeGen.atMember(JvstCodeGen.java:112)
at javassist.compiler.ast.Member.accept(Member.java:39)
at javassist.compiler.MemberCodeGen.atCallExpr(MemberCodeGen.java:510)
at javassist.compiler.JvstCodeGen.atCallExpr(JvstCodeGen.java:244)
at javassist.compiler.ast.CallExpr.accept(CallExpr.java:46)
at javassist.compiler.CodeGen.atAssignCore(CodeGen.java:877)
at javassist.compiler.CodeGen.atVariableAssign(CodeGen.java:810)
at javassist.compiler.CodeGen.atDeclarator(CodeGen.java:744)
at javassist.compiler.ast.Declarator.accept(Declarator.java:100)
at javassist.compiler.CodeGen.atStmnt(CodeGen.java:351)
at javassist.compiler.ast.Stmnt.accept(Stmnt.java:50)
at javassist.compiler.CodeGen.atStmnt(CodeGen.java:351)
at javassist.compiler.ast.Stmnt.accept(Stmnt.java:50)
at javassist.compiler.CodeGen.atMethodBody(CodeGen.java:292)
at javassist.compiler.CodeGen.atMethodDecl(CodeGen.java:274)
at javassist.compiler.ast.MethodDecl.accept(MethodDecl.java:44)
at javassist.compiler.Javac.compileMethod(Javac.java:169)
at javassist.compiler.Javac.compile(Javac.java:95)
at javassist.CtNewMethod.make(CtNewMethod.java:74)