DEV Community


Posted on • Updated on

Create a SpringBoot, Flyway project in a couple of minutes on Github

Alt Text
Starting a new project from scratch is a awesome feeling, and a daunting one when you think of ALL of the configurations, installing you need to do. I was there a lot of times and decided to create a GitHub Template repository for a SpringBoot project that uses Flyway migrations, PostgreSql and Java (at least version 11, but will go with 8 as well) and Maven.

The process is straight forward, you create a new repository and work on your project as you would normally do. The difference is when you decide that this is the base of any project with these technologies, then you can keep this snapshot and flag the repository as a "Template Project".
From this moment on, you can Fork, download locally etc and continue with your development but know you can always come back to the base in the future. For me personally this is great, because I spend less time on redundant tasks and more on creating and implementing useful features.

The project returns a list of remote developers and lets you search in the list by first name. This was arbitrary for me to choose and you will need to rename and create new objects as needed.


  • Java installed. I used Java 11
  • Postgresql driver installed
  • A terminal (GitBash etc)
  • An editor (IntelliJ etc)
  • A data scheme already created with name: postgres

Steps for getting started with it in Windows:

  1. git clone
  2. Add env variables for:
    REMOTEDEV_M_DB_SERVER: localhost
    REMOTEDEV_M_DB_USER: postgres

  3. Import/Open your project in your editor

  4. Create SpringBoot application config with below details if you want to run the project from outside of a command line
    Main Class: com.remote.developers.TemplateProjectApplication
    JRE: 11

For more information on how to create more development environments in the project checkout this post:

Try running the unit tests and the integration tests that already exist. They should pass, by the way :)

Flyway is already configured and your first table will be created when running the application. The script is in resources/db.migration/V1__InitDatabase.sql After successfully running the application, an entry will be added in the table "flyway_schema_history". For much more details about Flyway please check their docs:

  1. When you want to add more endpoints you need to allow them in the WebSecurityConfiguration class specifically or else you will get a HttpsStatus 404 back on trying to reach them.

All the names and credentials from above should be renamed and made more complex and unique for your project.

Code can be found here:

In time you can add as much functionality as you want. It's your call.
Happy coding.

Top comments (0)