WeatherService ws = (WeatherService) ctx.getBean("weatherService");
或
Map allWeatherServices = ctx.getBeansOfType(WeatherService.class);
《Spring 框架高级编程》学习笔记

最新推荐文章于 2021-07-27 17:46:50 发布

WeatherService ws = (WeatherService) ctx.getBean("weatherService");
或
Map allWeatherServices = ctx.getBeansOfType(WeatherService.class);