Answers for "spring config application"

0

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();
}
Posted by: Guest on December-07-2020

Code answers related to "spring config application"

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language