O'Reilly logo

Learning Spring Boot by Greg L. Turnquist

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Adding a production profile for a MySQL database

So far, we've built a pretty simple system. It bootstraps an in-memory database, preloads a team with three players, and then gives us a printout of the roster on the console. So, what happens when it's time to deploy this into production? There are several issues with using an in-memory database when it comes to production, and these issues are listed as follows:

  • An in-memory database isn't persistent across restarts.
  • By default, Spring Boot configures H2 to create-drop the database. This means that the database is wiped and reloaded every time.
  • The production database server most certainly is not running on our desktop. We have to tell Spring Boot where to connect and how.
  • It's possible that we the ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required