Skip to content

Support for extracting method body string expressions (e.g. URLs, concatenated strings) in Spring apps #42

@gediminasnn

Description

@gediminasnn

📌 Goal

I’m working on a Spring Boot microservice project and using jQAssistant (jqassistant-spring-plugin version 2.2.1) to analyze system architecture through static code and metadata.

Currently, I’m trying to analyze microservice uni-interactions by tracing hardcoded or dynamically constructed URLs built within client classes. These are often composed using service discovery and string concatenation inside method bodies.


🧪 What I’m trying to extract

Here’s a simplified example:

public class ClientServiceClient {

    private final Registry registry;

    public ClientServiceClient(Registry registry) {
        this.registry = registry;
    }

    public List<ClientDto> getClients(CountryCode cc) {
        String url = this.registry.find("clientservice").toString() +
                     "/clientservice/rest/client?country={cc}";
        ...
    }
...

In Neo4j, I’d like to analyze:

  • The value assigned to url
  • Literal string fragments like /clientservice/rest/...

🧩 What’s currently missing

After scanning:

  • The url value does not appear as any accessible node
  • There’s no connection between the method and that internal string expression

This makes it difficult to label a class as a client and trace which service it communicates with, which is important for architecture investigation.


💬 Questions

  1. Is it possible to extract these string expressions from method bodies with the current plugin?
  2. Are there alternative strategies or workarounds to detect such method-local string construction patterns?
  3. If this isn’t currently supported, I’d really appreciate your help shaping a possible approach.

I’ve just started a new role where I’m actively analyzing microservice architecture, so being able to trace these interactions is quite important. Any guidance you could share — or insight into whether this is already being considered — would mean a lot.


Thanks again for building and maintaining jQAssistant — it’s a fantastic tool with so much potential for real-world architecture analysis.

Best regards,
Gediminas

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions