How to do it...

Adding more ApplicationContext definition files might require some changes to be made on the servlet and Spring containers. Follow the given steps:

  1. In the ch02-web-xml project, it is recommended to create another XML definition file for application-related model objects such as Employee and Department. Using STS Eclipse or a template, define beans-context.xml and save the file in the directory where the root context is located:
  2. Open beans-context.xml, together with the required XSD schemas and metadata including all the Employee- and Department-related bean objects created in the previous recipes:
<?xml version="1.0" encoding="UTF-8"?> ...

Get Spring 5.0 Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.