java-tutorials/core-java-modules/core-java-9-jigsaw/src
Michael Angstadt 388f03ae9a Use ServiceLoader class to obtain service instance
In the "main-app" module, the `HelloInterface` service instance, `HelloModules`, was just being treated like an ordinary class that was exported from the "hello.modules" module. The code was not treating the class as a service class. This is not a good example of how services are used.

This commit makes use of the `ServiceLoader` class, which provides access to the `HelloInterface` instance as defined in the "hello.modules" module. This serves as a better example for how services are used.
2020-05-26 15:46:28 -04:00
..
modules Merge branch 'master' into BAEL-16633 2019-10-30 23:09:06 +01:00
simple-modules Use ServiceLoader class to obtain service instance 2020-05-26 15:46:28 -04:00
test/java/com/baeldung/java9/modules Merge branch 'master' into BAEL-16633 2019-10-30 23:09:06 +01:00