Building a quick prototype for a microservice

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:

  1. Decide which versions of Spring MVC, JPA and Hibernate to use.
  2. Set up a Spring context to wire all the different layers together.
  3. Set up a web layer with Spring MVC (including Spring MVC configuration):
    • Configure beans for DispatcherServlet, handler, resolvers, view resolvers, and so on
  4. Set up Hibernate in the data layer:
    • Configure beans for SessionFactory, data source, and so on
  5. Decide and implement how to store your application configuration, which varies between different environments.
  6. Decide ...

Get Mastering Spring 5.0 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.