jeudi 10 décembre 2015

What do you call the design pattern for loading a library resource by a project that uses it?

What do you call the design pattern for loading a library resource ONLY by a project that uses it?

In this case I am using Java/Spring and I have written a Java library (a test runner) that wants to load a configuration properties file. This "Java library" is meant to be loaded by a separate "Spring-MVC REST" web application that requires the loading of that configuration properties file. The web application operates as a trigger for the test runner in the library.

So, here is the scenario:

  1. Unit tests of the "java library" will load a sample properties file, just for testing functionality used by web applications that use the library.
  2. The web application that uses the libarary will require that the properties file exist in the classpath or else the web application will fail to load.
  3. In my working scenario, the web application has the context.xml configuration that loads the bean that reads the properties file.

Aucun commentaire:

Enregistrer un commentaire