IntelliJ IDEA
 
Get IntelliJ IDEA

Get started with REST development

Last modified: 11 October 2024

At the IntelliJ IDEA level, the RESTful Web Services development support is based on the Jakarta EE: RESTful Web Services (JAX-RS) plugin. This plugin is bundled with IntelliJ IDEA Ultimate and enabled by default.

Enabling REST support for a Maven project

  1. Open the pom.xml file and add the necessary dependency.

    The dependency should correspond to the Java version that is used in your project. For example, for Java EE, add:

    <dependency>
        <groupId>javax.ws.rs</groupId>
        <artifactId>javax.ws.rs-api</artifactId>
        <version>2.1.1</version>
    </dependency>

    If your project uses Jakarta EE, add:

    <dependency>
        <groupId>jakarta.ws.rs</groupId>
        <artifactId>jakarta.ws.rs-api</artifactId>
        <version>3.0.0</version>
        <scope>provided</scope>
    </dependency>
  2. Press CtrlShift0O to import the changes.

For more information about working with build tools, refer to Maven or Gradle.