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 ...