如题:spring获取bean的时候严格区分大小写

配置文件helloservice.xml中配置:

<dubbo:reference />

 

代码中:

ApplicationContext ctx=new ClassPathXmlApplicationContext("helloservice.xml");

IInsuranceSearchService insService=(IInsuranceSearchService)ctx.getBean("IInsurance");//IInsurance

则可获取成功

 

但是如果是:

ApplicationContext ctx=new ClassPathXmlApplicationContext("helloservice.xml");

IInsuranceSearchService insService=(IInsuranceSearchService)ctx.getBean("iInsurance");//iInsurance

则失败

相关文章: