Skip to content

Commit

Permalink
Make sure that ImportAwareAotBeanPostProcessor has role infrastructure
Browse files Browse the repository at this point in the history
  • Loading branch information
snicoll committed Aug 4, 2022
1 parent 332d4a4 commit e50db8c
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -568,6 +568,8 @@ private CodeBlock generateAddPostProcessorCode(Map<String, String> mappings) {
MAPPINGS_VARIABLE, type, from));
builder.addStatement("$T $L = new $T($T.class)", RootBeanDefinition.class,
BEAN_DEFINITION_VARIABLE, RootBeanDefinition.class, ImportAwareAotBeanPostProcessor.class);
builder.addStatement("$L.setRole($T.ROLE_INFRASTRUCTURE)",
BEAN_DEFINITION_VARIABLE, BeanDefinition.class);
builder.addStatement("$L.setInstanceSupplier(() -> new $T($L))",
BEAN_DEFINITION_VARIABLE, ImportAwareAotBeanPostProcessor.class, MAPPINGS_VARIABLE);
builder.addStatement("$L.registerBeanDefinition($S, $L)",
Expand Down

0 comments on commit e50db8c

Please sign in to comment.