You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
packagecom.in28minutes.spring.basics.springin5steps;
importorg.springframework.boot.SpringApplication;
importorg.springframework.boot.autoconfigure.SpringBootApplication;
importorg.springframework.context.ApplicationContext;
@SpringBootApplicationpublicclassSpringIn5StepsApplication {
// What are the beans?// What are the dependencies of a bean?// Where to search for beans? => No needpublicstaticvoidmain(String[] args) {
// BinarySearchImpl binarySearch =// new BinarySearchImpl(new QuickSortAlgorithm());// Application ContextApplicationContextapplicationContext =
SpringApplication.run(SpringIn5StepsApplication.class, args);
BinarySearchImplbinarySearch =
applicationContext.getBean(BinarySearchImpl.class);
intresult =
binarySearch.binarySearch(newint[] { 12, 4, 6 }, 3);
System.out.println(result);
}
}
/src/main/resources/application.properties
logging.level.org.springframework = debug
/src/main/resources/log.txt
Searching directory [/in28Minutes/git/getting-started-in-5-steps/spring-in-5-steps/target/classes/com/in28minutes/spring/basics/springin5steps] for files matching pattern [/in28Minutes/git/getting-started-in-5-steps/spring-in-5-steps/target/classes/com/in28minutes/spring/basics/springin5steps/**/*.class]
Identified candidate component class: file [/in28Minutes/git/getting-started-in-5-steps/spring-in-5-steps/target/classes/com/in28minutes/spring/basics/springin5steps/BinarySearchImpl.class]
Identified candidate component class: file [/in28Minutes/git/getting-started-in-5-steps/spring-in-5-steps/target/classes/com/in28minutes/spring/basics/springin5steps/BubbleSortAlgorithm.class]
Creating instance of bean 'binarySearchImpl'
Creating instance of bean 'bubbleSortAlgorithm'
Finished creating instance of bean 'bubbleSortAlgorithm'
Constuctor - Autowiring by type from bean name 'binarySearchImpl' via constructor
to bean named 'bubbleSortAlgorithm'
Setter - Autowiring by type from bean name 'binarySearchImpl' to bean named 'bubbleSortAlgorithm'
No Setter or Constructor - Autowiring by type from bean name 'binarySearchImpl' to bean named 'bubbleSortAlgorithm'
Finished creating instance of bean 'binarySearchImpl'