What’s New in IntelliJ IDEA 2021.2? Top Features You Shouldn’t Miss
IntelliJ IDEA 2021.2 introduces a refreshed icon, configurable actions on auto‑save, a powerful Package Search for Maven/Gradle, enhanced diagram views, automatic cache and log cleanup, and new microservice diagrams, helping developers work more efficiently and avoid common pitfalls.
Icon Changed
The IDEA icon has been updated to a more three‑dimensional design, though it still feels like something is missing.
Actions on Save
IDEA 2021.2 allows configuring actions triggered on auto‑save, such as reformatting code or optimizing Java imports. Settings are under Preferences/Settings → Tools → Actions on Save.
For example, setting reformatting to “Changed lines” will format only the modified code on save, avoiding the need to remember manual formatting.
It is recommended not to use “Whole file” for reformatting in multi‑developer environments to prevent merge conflicts.
Package Search for Maven/Gradle
A powerful Package Search page lets you manage Maven and Gradle dependencies, easily find and add new libraries, and view existing ones.
The underlying service uses JetBrains’ package‑search website (https://package-search.jetbrains.com/), which aggregates several repositories.
Searching for “Apache Commons” shows both Maven coordinates and a link to the library’s homepage. The feature is useful, though the external site may load slowly.
Diagram Structure View
IDEA 2021.2 improves the diagram feature with a left‑side thumbnail, allowing zoom and canvas navigation.
Automatic Cache and Log Cleanup
The new version automatically removes cache and log directories older than 180 days without affecting system settings or plugins.
You can also manually trigger cleanup via Help → Delete Leftover IDE Directories.
Microservice Diagram
IDEA now displays microservice diagrams, showing service interaction relationships. Use the Endpoints tool window to generate the diagram.
macrozheng
Dedicated to Java tech sharing and dissecting top open-source projects. Topics include Spring Boot, Spring Cloud, Docker, Kubernetes and more. Author’s GitHub project “mall” has 50K+ stars.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.