Database Reference
In-Depth Information
org.springframework.web.context.ContextLoaderListener
</listener-class>
</listener>
Alternatively, if you're building a standalone Java application, you could make use of the
ClassPathXmlApplicationContext class, as shown in the following snippet:
ClassPathXmlApplicationContext ctx
= new ClassPathXmlApplicationContext(
"classpath:applicationContext.xml");
UserRepository userRepository = ctx.getBean(UserRepository.class);
...
For more options on other ways you can provide Spring with its configuration details, see
the “Introduction to the Spring IoC container and beans” section of the Spring Framework
Reference Documentation : http://docs.spring.io/spring/docs/4.0.x/spring-framework-refer-
ence/htmlsingle/#beans-introduction .
Search WWH ::




Custom Search