Let's say we want to build a microservice with Spring MVC and use JPA (with Hibernate as the implementation) to connect to the database.
Let's consider the steps in setting up such an application:
- Decide which versions of Spring MVC, JPA and Hibernate to use.
- Set up a Spring context to wire all the different layers together.
- Set up a web layer with Spring MVC (including Spring MVC configuration):
- Configure beans for DispatcherServlet, handler, resolvers, view resolvers, and so on
- Set up Hibernate in the data layer:
- Configure beans for SessionFactory, data source, and so on
- Decide and implement how to store your application configuration, which varies between different environments.
- Decide ...