ololo3000 commented on a change in pull request #9759:
URL: https://github.com/apache/ignite/pull/9759#discussion_r791227542



##########
File path: 
modules/core/src/main/java/org/apache/ignite/internal/util/spring/IgniteSpringHelper.java
##########
@@ -99,7 +99,10 @@
      *       map value is {@code null}.
      * @throws IgniteCheckedException If failed to load configuration.
      */
-    public Map<Class<?>, Object> loadBeans(URL cfgUrl, Class<?>... 
beanClasses) throws IgniteCheckedException;
+    public IgniteBiTuple<Map<Class<?>, Collection>, ? extends 
GridSpringResourceContext> loadBeans(

Review comment:
       It seems that we should update the JavaDoc.

##########
File path: 
modules/spring/src/main/java/org/apache/ignite/internal/util/spring/IgniteSpringHelperImpl.java
##########
@@ -145,17 +143,24 @@
     }
 
     /** {@inheritDoc} */
-    @Override public Map<Class<?>, Object> loadBeans(URL cfgUrl, Class<?>... 
beanClasses) throws IgniteCheckedException {
+    @Override public IgniteBiTuple<Map<Class<?>, Collection>, ? extends 
GridSpringResourceContext> loadBeans(
+        URL cfgUrl,
+        Class<?>... beanClasses
+    ) throws IgniteCheckedException {
         assert beanClasses.length > 0;
 
         ApplicationContext springCtx = initContext(cfgUrl);
 
-        Map<Class<?>, Object> beans = new HashMap<>();
+        Map<Class<?>, Collection> beans = new HashMap<>();
 
-        for (Class<?> cls : beanClasses)
-            beans.put(cls, bean(springCtx, cls));
+        for (Class<?> cls : beanClasses) {
+            Map<String, ?> b = springCtx.getBeansOfType(cls);

Review comment:
       Let's rename `b` to `clsBeans`.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to