IntelliJ IDEA 2020.1 EAP6: Improvements for Spring WebFlux, HTTP Client, Swagger, Micronaut, and More

Posted on by Artem Sarkisov

The latest IntelliJ IDEA 2020.1 EAP build was released today. The new EAP upgrades IntelliJ IDEA Ultimate with a whole bunch of improvements for Spring WebFlux, OpenAPI & Swagger Codegen, Micronaut, message brokers, and the HTTP client. This post will cover all the updates in detail.

Spring WebFlux enhancements

IntelliJ IDEA 2020.1 improves support for Spring WebFlux. In particular, the IDE now works properly with the `Rendering` API, so that you can autocomplete and navigate to the related views in your application:

Other code insight features, such as finding usages (Alt+F7) and inline renaming (Shift+F6), are supported as well:

Similarly, the IDE now recognizes path variables so that you can quickly find their usages and/or rename them:

The Endpoints tool window now displays nested routes and can navigate you to the related router functions:

We have also supported Reactive WebSockets so that you can work with its endpoints from the Endpoints tool window:

Note that the enhancements mentioned above for Spring WebFlux are supported both for Java and Kotlin.

Code insight for JMS and Spring Messaging APIs

Starting with the latest v2020.1 EAP build, IntelliJ IDEA provides full code insight support for JMS and Spring Messaging APIs in Java and Kotlin applications.

The IDE adds code autocompletion and navigation to existing destinations based on the provider being used. For instance, you can autocomplete (Ctrl+Space) and navigate (Cmd/Ctrl+Click) to exchanges and queues if you are using RabbitMQ:

And do the same for topics if you are using Kafka:

There’s also a new icon on the gutter which can show and navigate you between all usages of the mentioned destination, for instance, the usages of the `Products` topic in our example:

And you can rename (Shift+F6) all the destinations at once:

You can also inject references (Alt+Enter) for ActiveMQ, RabbitMQ, Kafka, and JMS destinations:

HTTP Client improvements

With v2020.1 you can autocomplete URL paths and navigate to the related endpoints right from the HTTP request files:

You can now also generate HTTP requests from the Endpoints view:

Spring MVC handler methods now feature a gutter icon for URL mappings that allows you to create or use an existing HTTP request file, and navigate to the HTTP client:

The HTTP client now also correctly autocompletes path variables:

OpenAPI & Swagger Codegen

With v2020.1 you can configure and run Swagger Codegen right from the IDE. To do so, open your OpenAPI/Swagger file in the editor, and click Run Codegen in the upper right part of the editor. When you do so for the first time, the IDE will open the Edit configuration dialog, where you can specify a path to generate the files to, choose the local Swagger Codegen or download it from the web, specify the desired programming language to generate the files to, and other options. Click Apply and Run, and Swagger Codegen will generate and run the files. Here’s what the whole process looks like:

You can also click Edit Generation Settings to tweak the Swagger Codegen configuration. There is also an Advanced Settings tab, where you can specify a path to `.mustache` templates folder and choose a different JRE in case of compatibility issues:

Since v2020.1 you can also create openapi/swagger specifications. To do so, choose File | New | OpenAPI Specification, or use Cmd+N (for Mac) from the Project Tool window:

We have also added an ability to autocomplete code from remote specifications. Go to Preferences / Settings | Languages & Frameworks | OpenAPI Support, and add the specification url:

Now you can autocomplete URL paths from the added remote specification:

Micronaut

We added code insight support for config files in Micronaut applications. This means that now you can autocomplete parameters in `application.properties` and `application.yml` files, as well as see quick documentation for them and navigate to their definitions:

The IDE can also autocomplete basic data types, such as `int`, `long`, `boolean`, etc., and it inspects the invalid values:

Finally, you can now also autocomplete values from `application.yml` file in Micronaut context annotations. Previously this was only available for `application.properties` configs:

As for other improvements, the IDE now also recognizes injected RegExp fragments in Micronaut and JAX-RS URL mappings. Not only does this make the syntax more readable, but also enables you to quickly test your regular expressions (Alt+Enter):

JavaScript

You can now autocomplete URL references in JavaScript files and navigate to the related mappings:

Note that autocompletion in JavaScript files works for all supported server-side frameworks, such as JAX-RS, Spring frameworks, Micronaut, and also Swagger.

Project Generation for Quarkus and MicroProfile

With the latest v2020.1 EAP you can generate new Quarkus and MicroProfile projects directly from the New Project wizard. The dialog will walk you through the initial configuration where you can specify the name, Java version, build tool, extensions, and other options for your new project:

Well, that’s it for today! We hope you are looking forward to trying out all these new features. Let us know what you think in the comments below.

Check out the full release notes for the list of closed tickets in this EAP build.

Happy Developing!

Comments below can no longer be edited.

18 Responses to IntelliJ IDEA 2020.1 EAP6: Improvements for Spring WebFlux, HTTP Client, Swagger, Micronaut, and More

  1. HappyUser says:

    February 27, 2020

    Hello, quick question: is In-place Rename and Change Signature going to be supported in Scala as well (in addition to Java and Kotlin)? Thanks!

    • Artem Sarkisov says:

      March 2, 2020

      Hi,

      It won’t make to the Scala plugin any time around v2020.1, but our Scala team do plan to support it in one of the future releases.

  2. Pablo says:

    February 27, 2020

    What about support for opening files which are in WSL?
    Is it actually planed for 2020.1?
    This feature is a must in my opinion.

    • Artem Sarkisov says:

      March 2, 2020

      You should already be able to open files in WSL, but the experience is far from what you get when you work with local files and projects.

      Unfortunately, v2020.1 won’t feature full-fledged support for WSL, but it’s one of our top priorities for the future major releases.

      You may follow this ticket to track further plans, actions, and discussions https://youtrack.jetbrains.com/issue/IDEA-223986

  3. Algirdas says:

    February 27, 2020

    Hi, please revert EAP1 version of “Local changes/Preview Diff/Commit/Git” tab.
    Where was everything in one tab:
    – local changes
    – diff preview
    – commit
    – git history

    This layout was amazing using two monitors – one screen for editor, second divided in half for “Services” and “Local changes/Preview Diff/Commit/Git”.

    • Artem Sarkisov says:

      March 2, 2020

      Hi there,

      Actually that was an experimental layout, and unfortunately we won’t be moving back to it.

      Also, since the latest EAP we rolled the Commit functionality back to the Modal Commit (like it used to be in v2019.3 and older) for all the existing users.

      You may re-enable the Commit Dialog in Preferences / Settings | Version Control | Commit Dialog. Then you can just move it to the bottom of the editor (Gear icon | Move to | Bottom Left) to make it look like it used to in the first v2020.1 EAP that you are referring to. However, the Git tool window will remain a separate tool window in this case we don’t plan to change it.

  4. R. G. says:

    February 27, 2020

    Great stuff, nice to have the option to use the IDE to generate Quarkus project. I think it can be handy for demos or playgrounds.

    I have a question for the part where it reads
    “With v2020.1 you can autocomplete URL paths and navigate to the related endpoints right from the HTTP request files:”
    Would be possible that the path variable “name” in HTTP Client editor tab

    Would be possible that in the HTTP Client editor tab, in that example when calling a navigation in the “name” path variable (as shown in the animated image / video) only the “@Get” are listed in the pop-up? The HTTP Client is using a “GET” request for that case.

    The HTTP Client is using a “GET” request but the navigation pop-up shows “@Get” and “@Post”.

    I haven’t created any YouTrack ticket about this. Maybe there is a reason to list other usages of “name” with other HTTP methods used in the mappings in the application.

  5. donghuo says:

    February 28, 2020

    We need kotlin + gradle speed up~~~~~~~

  6. Timofey says:

    February 28, 2020

    Also noticed embedded SQL query results. Interesting feature, but it needs time to get used to. Tried to disable it (unchecked Settings > Tools > Database > Show output results in editor) – no success. Any help? Link to YouTrack issue?

    • Timofey says:

      February 28, 2020

      My bad, “In-editor results” toolbar button was pressed in the database console window.

  7. Joe says:

    February 28, 2020

    Why was the new commit interface removed? I was just getting used to it and starting to like it. Had a couple of things I didn’t like but all in all I liked it. Two things I didn’t like:

    1) Wish the diff view appear to the right like it used to rather than up in the editor
    2) Wish the Commit and Push option could be set as the default, but if not wish selecting Commit and Push wasn’t the same as pushing the button. Selecting Commit and Push should have been 1 step, and then pushing the button with Commit and Push selected should have been a 2nd step (although this would be moot if Commit and Push could be set as the default).

    • Nic says:

      March 2, 2020

      don’t worry – you can easily return back new design – just go to File | Settings | Version Control | Commit Dialog and check Commit from Local Changes without showing the Commit dialog.

  8. Mateus Mercer says:

    March 5, 2020

    The new HTTP Client is so good!

    It boosted my productivity since I can make HTTP requests as-is without using anything external like the ugly slow PostMan. The new feature enabling auto-complete for Spring will boost even more my productivity when it comes to HTTP endpoints.

    Keep the good work! By the way, is there a estimative for the release date?

  9. Rafael Nascimento Sampaio says:

    March 9, 2020

    Hi guys,
    Just checking, some of the IntelliJ changes make their way to other JetBrains products like PHPStorm, WebStorm, Datagrip, etc. I’m curious about this new feature “OpenAPI & Swagger Codegen”, will it make its way into those apps? Would it be compatible with other languages inside IntelliJ, like Ruby, Python, and PHP?

    • Yuriy Artamonov says:

      March 11, 2020

      Hi,
      Yes, we are planning to introduce Swagger/OpenAPI editing and code generation features for all IDEs. I’m not sure about DataGrip, but we will enable it for PhpStorm, WebStorm and others in one of the next releases.

  10. Sarang Kanabargi says:

    May 30, 2020

    Hey!

    How can we configure the swagger codegen for Idea 2020.1 to generate kotlin-spring instead of kotlin-server? kotlin-server generates Ktor server API and I want to override with Spring boot ie, use kotlin-spring instead.

    When I specify kotlin-spring I get the error “Exception in thread “main” java.lang.RuntimeException: Can’t load config class with name kotlin-spring” followed by list of available options which includes kotlin-server and kotlin-client

    When I run an equivalent command using cli, it works ie, java -jar /usr/local/Cellar/openapi-generator/4.3.1/libexec/openapi-generator-cli.jar generate -i WeatherAPISpecs.yaml -g kotlin-spring -c MyOptions.json -o . works! (openapi generator is installed on Mac using homebrew)

    Please check, if I missed anything, I’m using remote swagger 3 codegen URL

    • Nikita Katkov says:

      June 1, 2020

      Hi! Thank you for the feedback!

      Currently used generator is Swagger Codegen which doesn’t have `kotlin + spring` option included. OpenAPI Generator is a slightly different solution which support is being worked on. So stay tuned! The improved code generation support will be available in one of the upcoming releases.

Subscribe

Subscribe for updates