#vulnerable code 
                             public static void main(String[] args) {

		ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext(new String[]{"META-INF/spring/dubbo-demo-consumer.xml"});
		context.start();

		// dubbo protocol
		DemoService demoService = (DemoService) context.getBean("demoService"); // 获取远程服务代理
		String hello = demoService.sayHello("dubbo"); // 执行远程方法
		System.out.println(hello); // 显示调用结果

		// hessian protocol 直连
		DemoService demoService2 = (DemoService) context.getBean("demoService2");
		String hello2 = demoService2.sayHello("hessian直连");
		System.out.println(hello2);

		// hessian protocol
		DemoService demoService3 = (DemoService) context.getBean("demoService3");
		String hello3 = demoService3.sayHello("hessian");
		System.out.println(hello3);

		// service group
		DemoService demoService4 = (DemoService) context.getBean("demoService4");
		String hello4 = demoService4.sayHello("group:new");
		System.out.println(hello4);

		// 回声测试可用性
        EchoService echoService = (EchoService) demoService;
        Object status = echoService.$echo("OK");
        System.out.println("回声测试：" + status.equals("OK"));

	} 
                            #location 22 
                            #vulnerability type RESOURCE_LEAK
#fixed code
                             public static void main(String[] args) throws Exception {

		ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext(new String[]{"META-INF/spring/dubbo-demo-consumer.xml"});
		context.start();

		// 异步调用
		async(context);

		// dubbo protocol
		DemoService demoService = (DemoService) context.getBean("demoService"); // 获取远程服务代理
		String hello = demoService.sayHello("dubbo"); // 执行远程方法
		System.out.println(hello); // 显示调用结果

		// hessian protocol 直连
		DemoService demoService2 = (DemoService) context.getBean("demoService2");
		String hello2 = demoService2.sayHello("hessian直连");
		System.out.println(hello2);

		// hessian protocol
		DemoService demoService3 = (DemoService) context.getBean("demoService3");
		String hello3 = demoService3.sayHello("hessian");
		System.out.println(hello3);

		// service group
		DemoService demoService4 = (DemoService) context.getBean("demoService4");
		String hello4 = demoService4.sayHello("group:new");
		System.out.println(hello4);

		// 回声测试可用性
        EchoService echoService = (EchoService) demoService;
        Object status = echoService.$echo("OK");
        System.out.println("回声测试：" + status.equals("OK"));

        System.out.println("#######################ALL SUCCESSFUL##########################");

	}