0

What type of information should be present in the dispatcher-servlet.xml and applicationContext.xml?

2

1 Answer 1

3

The applicationContext.xml is loaded by the ContextLoadeListener and should contain your shared/global beans. Things like the datasource, jms connecetionfactories, services, repositories etc.

Your dispatcher-servlet.xml is loaded by the DispatcherServlet and should contain only web related things like controllers, viewresolvers, exceptionhandlers etc.

This is a general rule of thumb of course.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.