Separate API and impl for important layers

Another best practice to ensure loosely coupled application layers is to have separate API and implementation modules in each layer. The following screenshot shows the data layer with two submodules--API and impl:

The data pom.xml defines two child modules:

    <modules>      <module>api</module>      <module>impl</module>    </modules>

The api module is used to define the interface that the data layer offers. The impl module is used to create the implementation.

The business layer should be built using the API from the data layer. The business layer should not depend on the implementation (the impl module) of the ...

Get Mastering Spring 5.0 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.