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?

有帮助吗?

解决方案

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.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top