←  back to guides
Set up a Spring Boot Remote Development Environment With JetBrains Gateway and Gitpod

Set up a Spring Boot Remote Development Environment With JetBrains Gateway and Gitpod

Announcement 🚀 : Today, Gitpod and Jetbrains join forces to solve the ‘works on my machine’ problem. Bringing JetBrains’ deep product integration with Gitpod’s remote workspaces to developers around the world.

This gives developers the best of both worlds -

  • Reproducible developer environments provisioned by Gitpod
  • Favorite desktop IDE from Jetbrains - IntelliJ IDEA, PyCharm, GoLand, and PhpStorm

You can read the full announcement on our blog here.

JetBrains IDEs are one of the highly favored IDEs amongst developers. They provide excellent debugging and refactoring experience and built-in integrations with many tools such as docker, databases, web servers, etc. Through JetBrains Gateway, Gitpod delivers the choice of using JetBrains IDEs as a development environment for Gitpod workspaces. It will provide a familiar developer experience to long time users of JetBrains IDEs with the flexibility of cloud workspaces provided by Gitpod 🍊

This guide will teach you to set up a Spring project using JetBrains Gateway and Gitpod. Let’s get started 🚀

Setting up your first Spring project using JetBrains Gateway and Gitpod

1. Setup

Gitpod JetBrains IDE integration is powered with JetBrains Gateway, a compact desktop app to connect to remote workspaces without installing an IDE.

  1. Install JetBrains Gateway

  2. Install Gitpod Plugin in JetBrains Gateway :

    Gitpod provides a plugin that you can install in JetBrains Gateway to connect to and manage Gitpod workspaces.
    • Open JetBrains Gateway Preferences from macOS application menu or Settings from File menu in Linux/Windows.

    • Navigate to Plugins and search for Gitpod in the Marketplace to find and install the Gitpod Gateway plugin.

      Installing Gitpod plugin in JetBrains Gateway
      Installing Gitpod Gateway plugin in JetBrains Gateway
  3. Update your preferences on the Gitpod dashboard :

    Select IntelliJ IDEA on the Gitpod preferences page. It will set IntelliJ IDEA as your default desktop IDE for future workspaces. This will launch an IDE window connected to your Gitpod workspace. You can also choose to use other JetBrains IDEs such as GoLand, PyCharm or PhpStorm.

    Gitpod Preferences
    Gitpod Preferences
  4. Connect to your workspace from JetBrains Gateway :

    Open JetBrains Gateway on your machine, and click Connect to Gitpod under the Gitpod section, connect to your workspace or create a new one from an existing repository.

    Connect to Gitpod
    Connect to Gitpod
    Create a new workspace
    Create a new workspace

If you want to read about the whole process in detail, you can refer to our online documentation 📖.

2. How to create a new Spring Boot project

You can create a new Gitpod workspace using JetBrains Gateway with our Spring Boot template. This template uses Java 11 and Gradle and is configured for creating Gitpod workspaces.

  1. Launch JetBrains Gateway and navigate to the Gitpod tab.
  2. Enter https://github.com/gitpod-io/template-java-spring-boot-gradle as the repository URL and click on New Workspace to start a new Gitpod workspace.
    Create Spring Boot project from our template
    Create Spring Boot project from our template

3. Run your project

  1. Wait for the IDE to import the project and install the dependencies.

  2. Run your project by clicking on the Run button. IntelliJ IDEA starts your Spring application in the ‘Run window’.

    Run app inside IntelliJ IDE
    Run app inside IntelliJ IDE
  3. Once the Spring application starts, IntelliJ IDEA will prompt you for the availability of port 8080. Click on the port and select Forward and open in browser to launch the application in your web browser.

    Launch your app
    Launch your app 🚀
  4. You can use the IntelliJ IDEA integrated terminal to run shell commands on your Gitpod workspace as well.

Congratulations 🎉😄
You have successfully set up your first Spring Boot project using Gitpod and JetBrains Gateway!
Further, if you want to learn more about running your existing codebase using Gitpod and JetBrains Gateway, you can follow the next section.

Setting up your existing codebase using JetBrains Gateway and Gitpod

You can open an existing codebase using Gitpod and JetBrains Gateway. To get started with Gitpod, add a .gitpod.yml file in the root directory of your existing codebase. The .gitpod.yml file at the root of your project is where you tell Gitpod how to prepare & build your project, start development servers and configure continuous prebuilds for GitHub. Hence, improving the developer experience on Gitpod ✨

Customizing .gitpod.yml

Here is the .gitpod.yml, used in our template. It runs Gradle build when you open the workspace.

language icon yml
    - init: ./gradlew build

You can change the command to build your application or add more commands to run when your workspace starts. You can also add plugins to install in your IDEA instance automatically.

To learn more about customizing .gitpod.yml according to your requirements, refer to our documentation.

Working on Gitpod workspace using JetBrains Gateway

Using Gitpod on JetBrains Gateway feels like working on a project on a locally installed copy of IntelliJ IDEA. You can use the same shortcuts, powerful debugging tools, refactoring and plugins as you do on your local IDE without needing to set up your entire project on your machine.

This integration provides you with the best experience of using the cloud development environment of Gitpod and the comfort and familiarity of your JetBrains IDE. ✨

Join developers, everywhere.

Development environments pre-configured with the tools and dependencies needed to get inspired and start building.

Monthly Newsletter

Subscribe to get a summary of what we've shipped over the last month, plus everything you need to know around developer experience.

By submitting this, I confirm that I have read and understood the Privacy policy.

Related articles