IDE Setup - IntelliJ Community Edition
Every developer has their own preferences when it comes to the tools they use. This guide will walk through the process of setting up and using IntelliJ (Community Edition) to work with a SpringBot application. Since the Community Edition of IntelliJ doesn’t natively support TypeScript or JavaScript, you may choose to include some available Enterprise plugins or purchase IntelliJ Ultimate.
IntelliJ Community Edition
- Download and install the latest version of IntelliJ Community Edition
- After install, Open IntelliJ and click “Skip Remaining and Set Defaults”
-
You should now be presented with the following screen:
- Select Open and navigate to the repository folder
- We need to import the Gradle module. This can be done File -> New -> Module from Existing Sources… Select the
serverside
and click open. -
In next the popup window pick
Import module from external model
and highlight Gradle then click finish -
On the bottom right of the screen there should be a small popup. Select
Import Gradle Project
Running the Server-Side
- Click
Add Configuration
- Add a new configuration by clicking the
+
icon and select Gradle - In Gradle Project, click the folder icon and select the your project’s name
- Type
bootRun
in the Tasks textfield - In the Environment Variables copy and paste the following:
SPRING_PROFILES_ACTIVE=dev;DATA_SOURCE_USERNAME=codebots;DATA_SOURCE_PASSWORD=bots;DATA_SOURCE_URL=jdbc:postgresql://localhost:5432/codebots`
- Now you can successful run the
serverside
through the IDE.
Running the Server-Side in Debug
Running the server-side in debug is as simple as clicking the bug icon instead of the play button. You can also use IntelliJ’s breakpoints to step through the application.
Running the Client-Side
You can use the terminal within IntelliJ to run the client-side.
- To open the terminal go to View -> Tools Window -> Terminal
- Make sure you change directory to the
clientside
- If this is the first time running the client-side, you will need to run
npm install
first - Use
npx ng serve
to run theclientside
Running the Client-Side in Debugger
Since Typescript and Javascript support is not supported by free plugins, you can use Chrome to debug the client-side. You can add debugger in your code base at the line you want to focus on, and this will trigger your browser to add a breakpoint in that same spot.
Was this article helpful?