Domanda

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?

È stato utile?

Soluzione

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.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top