Question

I am not understanding the concept behind @Module annotation. Documents say, its where you can setup the code / load the container. But I am not getting that.

I see that there are set of return types for methods annotated with @Module. But I do not see those methods used anywhere in the code. I am speaking from Testing context.

Can someone please explain?

Était-ce utile?

La solution

Prior to running the test the container will invoke the @Module annotated methods of the test class and deploy those applications. Effectively, use @Module to build and return the application you want to test.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top