Git Product home page Git Product logo

Comments (6)

simonbrowndotje avatar simonbrowndotje commented on May 21, 2024

If you create a ComponentFinder for the third-party components first (and call findComponents), and then create a second ComponentFinder for your own components, you should see the relationships show up.

from java.

devnoo avatar devnoo commented on May 21, 2024

ok, added the component manually to the container, before adding the
component finder for spring, so instead of doing this, i have to add a
component finder that "finds",(or just adds ) the 3rd party components.
Thanx

On Thu, Mar 31, 2016 at 10:38 AM, Simon Brown [email protected]
wrote:

If you create a ComponentFinder for the third-party components first (and
call findComponents), and then create a second ComponentFinder for your own
components, you should see the relationships show up.


You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub
#25 (comment)

from java.

devnoo avatar devnoo commented on May 21, 2024

it only works when i do it the other way around,

So first i define scan my own components, then i add the 3rd party finder, and probably only because i don't extend the AbstractReflectionsComponentFinderStrategy for the 3rd party component Finder.
`

ComponentFinder axonComponentFinder = new ComponentFinder(
    containers.webApplication, "org.axon",
    new AbstractNamingConventionComponentFinderStrategy() {
        @Override
        protected boolean matches(Class<?> type) {
            return type.equals(DefaultCommandGateway)
        }
    }
);


ComponentFinder componentFinder = new ComponentFinder(
    containers.webApplication, "nl.devnoo",
    new CustomComponentFinderStrategy()
);

componentFinder.findComponents();
axonComponentFinder.findComponents()

`

if i change the order of the find components it won't put the dependencies.
Seeing the code in the AbstractReflectionsComponentFinderStrategy this seems logical, because it gets the components from the container and then intentionally excludes the components that are no in the current package to scan.

from java.

simonbrowndotje avatar simonbrowndotje commented on May 21, 2024

I'm been mulling this over and the following check in findEfferentDependencies seems unnecessary, especially if previous component finders have found components in different packages.

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

I'll create some test cases to simulate what you're doing.

from java.

simonbrowndotje avatar simonbrowndotje commented on May 21, 2024

That restriction has now been removed; you should be able to use multiple component finders in any order. Thanks Job.

from java.

devnoo avatar devnoo commented on May 21, 2024

Yeah was exactly the if statement i was wondering about. Thanks for the
quick reaction.

On Thu, Mar 31, 2016 at 10:57 PM, Simon Brown [email protected]
wrote:

That restriction has now been removed; you should be able to use multiple
component finders in any order. Thanks Job.


You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub
#25 (comment)

from java.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.