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?

Was it helpful?

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top