I walked across many Spring tutorials explaining @Configuration
and @Bean
annotations, and always the @Bean
annotation is put above a method that is returning some Spring bean but never follows the java bean getter standard. for example :
@Bean
public LocalSessionFactoryBean sessionFactory() { ... }
and not
getSessionFactory()
Can anyone explain why is this standard abandoned here?