You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ignite.apache.org by GitBox <gi...@apache.org> on 2022/06/24 10:26:04 UTC

[GitHub] [ignite] ololo3000 commented on a diff in pull request #10106: IGNITE-17218 Adds support of optional beans for SpringResource annotation injection.

ololo3000 commented on code in PR #10106:
URL: https://github.com/apache/ignite/pull/10106#discussion_r905934103


##########
modules/spring/src/test/java/org/apache/ignite/internal/processors/resource/GridSpringResourceInjectionSelfTest.java:
##########
@@ -304,6 +323,47 @@ private void setDummyResourceBean(AnotherDummyResourceBean dummyRsrcBean) {
             ".GridSpringResourceInjectionSelfTest$AnotherDummyResourceBean' available");
     }
 
+
+    /** */
+    @Test
+    public void testClosureMethodWithDuplicatingResourceClass() {
+        assertError(new IgniteCallable<Object>() {
+            private DuplicatedResourceBean rsrcBean;
+
+            @SpringResource(resourceClass = DuplicatedResourceBean.class, required = false)
+            private void setDummyResourceBean(DuplicatedResourceBean rsrcBean) {
+                this.rsrcBean = rsrcBean;
+            }
+
+            @Override public Object call() {
+                fail();
+
+                return null;
+            }
+        }, grid, NoUniqueBeanDefinitionException.class, "No qualifying bean of type" +
+            " 'org.apache.ignite.internal.processors.resource.GridSpringResourceInjectionSelfTest$DuplicatingResourceBean'" +

Review Comment:
   Done. Thanks a lot!
   



-- 
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: notifications-unsubscribe@ignite.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org