Skip to content
This repository was archived by the owner on Mar 28, 2026. It is now read-only.
This repository was archived by the owner on Mar 28, 2026. It is now read-only.

AbstractReflectionsComponentFinderStrategy only allows for dependencies in the scanned package #25

@devnoo

Description

@devnoo

I added some components from 3rd party libraries that are used by a lot of spring controllers, and then i scan for the spring controllers. I expected the controllers to be linked the controller but while they all show up in the diagram there is no usage in between. Looking at the code of AbstractReflectionComponentFinderStrategy it seems it only will link components that reside in the scanned package. It would really be useful to allow it to add dependencies to all the already registered components. Or at least make it configurable.
so this if in the addEfferentDependencies is causing this behavior:

` if (referencedTypeName.startsWith(componentFinder.getPackageToScan())) {

                Component destinationComponent = componentFinder.getContainer().getComponentOfType(referencedTypeName);
                if (destinationComponent != null) {
                    if (component != destinationComponent) {
                        component.uses(destinationComponent, "");
                    }
                } else if (!referencedTypeName.equals(implementationType) && depth < 10) {
                    addEfferentDependencies(component, referencedTypeName, ++depth);
                }
            }`

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