DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Refcards Trend Reports
Events Video Library
Refcards
Trend Reports

Events

View Events Video Library

Related

  • IntelliJ and Java Spring Microservices: Productivity Tips With GitHub Copilot
  • Building Micronaut Microservices Using MicrostarterCLI
  • Using Kong Ingress Controller with Spring Boot Services
  • Stateless JWT Auth Microservice Architecture With Spring Boot 3 and Redis Sentinel

Trending

  • The Agentic Agile Office: Streamlining Enterprise Agile With Autonomous AI Agents
  • How to Write for DZone Publications: Trend Reports and Refcards
  • Zero-Downtime Deployments for Java Apps on Kubernetes
  • Rethinking Java CRUDs With Event Sourcing and CQRS Patterns
  1. DZone
  2. Data Engineering
  3. Data
  4. Microservices Annotator Plugin

Microservices Annotator Plugin

Learn about a small IDE plugin that annotates any important places in your codebase and will make your microservices code easier to read and navigate.

By 
Yuriy Artamonov user avatar
Yuriy Artamonov
·
Jan. 12, 22 · Tutorial
Likes (5)
Comment
Save
Tweet
Share
4.2K Views

Join the DZone community and get the full member experience.

Join For Free

Writing microservices has never been easy and does not become easier with growing codebases. All the complexity strives from tons of interactions between the moving parts of your applications.

And then we had this year's holidays and I had enough free time to think about it. Many complex measures can be used to make the code of microservices more readable, numerous expressive APIs, modern languages, we already use all of these, but the situation does not get better.

Finally, I've found a stupid simple approach to simplify the reading of code — just show a couple of icons for the most dangerous places where services interact with file systems, networks, make database queries, etc. And wow! It finally makes the code easier to read for me; I clearly see those important interaction points where things may go wrong.

Please welcome, the result of my Christmas holidays: Microservices Annotator plugin for IntelliJ IDEA. Because what else do developers from the IntelliJ IDEA team do on holidays — of course, they do plugins for IntelliJ IDEA!

In a nutshell, it just shows line markers for method calls in Java and Kotlin code where you call some well-known API methods, such as Spring Data or Spring Feign Client calls.

Screenshot: line markers for method calls

But that is just the tip of the iceberg. I know for sure, people use tons of custom APIs and not only OSS things like Spring Framework. That's why this plugin also enables you to mark any method in your codebase as some meaningful interaction point.

Screenshot: menu option to mark microservice interaction methodThere are many interaction types supported: 

Screenshot: menu of interaction types

Then the plugin just remembers your method signature in the project settings and you will be able to share the .idea/microserviceCalls.xml file with your colleagues. Also, if you try to annotate some API from a known public library, such as code inside org.springframework package, this usage will be reported to our server so this setting can be distributed to all users of the plugin after moderation. You can check APIs that have been recently approved on https://msa.strangeway.org/.

And this is a community-driven project, so all the data of marked public APIs are available on Github. 

Finally, it is just that simple for you:

Gif: using the plugin

Please try and give us some feedback!

Would be great to hear not only positive feedback but also some criticism of this approach, maybe some better options exist. What do you think?

microservice intellij

Opinions expressed by DZone contributors are their own.

Related

  • IntelliJ and Java Spring Microservices: Productivity Tips With GitHub Copilot
  • Building Micronaut Microservices Using MicrostarterCLI
  • Using Kong Ingress Controller with Spring Boot Services
  • Stateless JWT Auth Microservice Architecture With Spring Boot 3 and Redis Sentinel

Partner Resources

×

Comments

The likes didn't load as expected. Please refresh the page and try again.

  • RSS
  • X
  • Facebook

ABOUT US

  • About DZone
  • Support and feedback
  • Community research

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Core Program
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 3343 Perimeter Hill Drive
  • Suite 215
  • Nashville, TN 37211
  • [email protected]

Let's be friends:

  • RSS
  • X
  • Facebook