### Question:
MyProxyUtil { public static BaseService getBaseServiceWithJdk(BaseService baseService) { Object o = Proxy.newProxyInstance( baseService.getClass().getClassLoader(), baseService.getClass().getInterfaces(), new InvocationHandler() { @Override public Object invoke(Object proxy, Method method, Object[] args) throws Throwable { System.out.println("jdk代理"); return method.invoke(baseService, args); } }); return (BaseService) o; }  static void main(String[] args); static BaseService getBaseServiceWithJdk(BaseService baseService); static BaseService getBaseServiceWithCgLib(BaseService baseService);  }### Answer:
@Test public void getBaseServiceWithJdk() { BaseService bs = new BaseServiceImpl(); BaseService proxy = MyProxyUtil.getBaseServiceWithJdk(bs); proxy.doSome(); }