Use a dependency's resources?

前端 未结 5 856
死守一世寂寞
死守一世寂寞 2020-12-01 09:09

In my Maven project there is one module (core) that has a few resources for its classes. When running classes inside the module its able to get its own resources. Everything

5条回答
  •  遥遥无期
    2020-12-01 09:50

    I do not think it is a good idea. Suppose you have module A. It depends from 'B'. 'B' depends from C. Basically, you should care in A only about interface of B module. Perhaps, tomorrow it change dependence from C to D. If it would happen you will need change A. It is not good situation, is it? So declare dependence A from C in implicit way.

    In short: How can I access the resources of a dependency?

    In short: declare this dependence directly.

提交回复
热议问题