I can declare a bean in Spring using @Bean annotation. Let's say I declare two beans of String type in my Application Context.
@Bean
public String country(){ return "India";}
@Bean
public String continent(){ return "Asia";}
In this case what will happen when the Spring Container will boot strap? Would there be any error?
Two spring beans can be created in same context. But they need to be created in separate @Configuration files and separate access.