Submitted by jjadmin on Sun, 05/22/2016 - 22:37
-
If you invoke getBean("writer") and there are two beans defined with the name writer in your xml configuration file or Java configuration file. What will happen?
-
It will return the second one defined.
Submitted by jjadmin on Mon, 05/16/2016 - 22:30
Through the autowiring feature, spring will intelligently guess some of the bean injection without needing to configure explicitly. Spring can do autowiring based on the type of the bean, name of the bean, and constructor of the bean. Default is autowire by type.
Submitted by jjadmin on Sun, 05/15/2016 - 02:04
A Spring Boot standalone application uses the @SpringBootApplication annotation over the main class, which also has the main method to execute the application. The SpringApplication.run method call accepts two parameters — the class that actually contains the annotated @SpringBootApplication annotation and any application arguments. The ApplicationArguments interface allows you to access any application arguments.
Submitted by heartin on Sat, 05/14/2016 - 13:13
@Profile annotation allow you to register components that will be selected only if its associated profile is active. You can selectively activate a set of beans in a class or all beans .
Submitted by heartin on Sat, 05/14/2016 - 09:07