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

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

配置文件helloservice.xml中配置:

<dubbo:reference id="IInsurance" interface="xx.xx.asdf.IHelloService" timeout="500000" url="dubbo://172.XXX.XXX.XXX:20880"/>

代码中:

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

则失败

原文地址:https://www.cnblogs.com/shoubianxingchen/p/4211516.html