@configuration properties spring boot code example

Example 1: spring application configuration example

public static void main(String[] args) {
   AnnotationConfigApplicationContext ctx = new AnnotationConfigApplicationContext();

   ctx.register(AppConfig.class, OtherConfig.class);
   ctx.register(AdditionalConfig.class);
   ctx.refresh();

   MyService myService = ctx.getBean(MyService.class);
   myService.doStuff();
}

Example 2: spring boot configuration property bean at class path

org/springframework/cloud/autoconfigure/ConfigurationPropertiesRebinderAutoConfiguration.class