Spin up the Spring container

In Spring, the org.springframework.context.ApplicationContext interface represents the Spring IoC container. In a standalone application, the typical way of setting up the container is to use ClassPathXmlApplicationContext or AnnotationConfigApplicationContext. Both are implementations of the ApplicationContext interface. And, as the name suggests, ClassPathXmlApplicationContext is used for XML-based configuration, while AnnotationConfigApplicationContext is used for Java-based configuration, and this is the one we will use.

Let's start building the backend of the Messages App. We will build it into a workable Spring Boot web application piece by piece as we introduce the features of Spring.

All of the code in ...

Get Building Applications with Spring 5 and Vue.js 2 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.