-
Notifications
You must be signed in to change notification settings - Fork 0
/
AOT-6.0.11-MyConfiguration__BeanDefinitions.java
40 lines (36 loc) · 1.51 KB
/
AOT-6.0.11-MyConfiguration__BeanDefinitions.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
package com.itineric;
import org.springframework.beans.factory.aot.BeanInstanceSupplier;
import org.springframework.beans.factory.config.BeanDefinition;
import org.springframework.beans.factory.support.RootBeanDefinition;
import org.springframework.context.annotation.ConfigurationClassUtils;
/**
* Bean definitions for {@link MyConfiguration}.
*/
public class MyConfiguration__BeanDefinitions {
/**
* Get the bean definition for 'myConfiguration'.
*/
public static BeanDefinition getMyConfigurationBeanDefinition() {
RootBeanDefinition beanDefinition = new RootBeanDefinition(MyConfiguration.class);
beanDefinition.setTargetType(MyConfiguration.class);
ConfigurationClassUtils.initializeConfigurationClass(MyConfiguration.class);
beanDefinition.setInstanceSupplier(MyConfiguration$$SpringCGLIB$$0::new);
return beanDefinition;
}
/**
* Get the bean instance supplier for 'myBean'.
*/
private static BeanInstanceSupplier<MyBean> getMyBeanInstanceSupplier() {
return BeanInstanceSupplier.<MyBean>forFactoryMethod(MyConfiguration.class, "myBean")
.withGenerator((registeredBean) -> registeredBean.getBeanFactory().getBean(MyConfiguration.class).myBean());
}
/**
* Get the bean definition for 'myBean'.
*/
public static BeanDefinition getMyBeanBeanDefinition() {
RootBeanDefinition beanDefinition = new RootBeanDefinition();
beanDefinition.setTargetType(MyBean.class);
beanDefinition.setInstanceSupplier(getMyBeanInstanceSupplier());
return beanDefinition;
}
}