Skip to content

Commit a7c6877

Browse files
committed
ignore EntityFactory aware error
1 parent 03b72a5 commit a7c6877

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

hsweb-commons/hsweb-commons-api/src/main/java/org/hswebframework/web/api/crud/entity/EntityFactoryHolderConfiguration.java

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
package org.hswebframework.web.api.crud.entity;
22

3+
import org.springframework.beans.BeansException;
34
import org.springframework.context.ApplicationContextAware;
45
import org.springframework.context.annotation.Bean;
56
import org.springframework.context.annotation.Configuration;
@@ -10,7 +11,13 @@ public class EntityFactoryHolderConfiguration {
1011

1112
@Bean
1213
public ApplicationContextAware entityFactoryHolder() {
13-
return context -> EntityFactoryHolder.FACTORY = context.getBean(EntityFactory.class);
14+
return context -> {
15+
try {
16+
EntityFactoryHolder.FACTORY = context.getBean(EntityFactory.class);
17+
} catch (BeansException ignore) {
18+
19+
}
20+
};
1421
}
1522

1623
}

0 commit comments

Comments
 (0)