Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to reference another project in a .properties file

I want to set a property in a .properties file. It should reference another package or project. I am using spring / spring boot

For example:

some_file: ${another_package_name}/src/main/resources/some_file.txt

like image 917
Christian Avatar asked Oct 19 '25 10:10

Christian


1 Answers

Where you say ${another_package_name} that is where the project would be for a gradle or maven project so I'm going to assume you are attempting to cross reference resources between projects.

The location of

${another_package_name}/src/main/resources/some_file.txt 

could also be called

classpath:some_file.txt

So then you would just need to make sure that both projects are on the classpath and then some_file.txt should be available to the project as a whole.

Reference

http://docs.spring.io/autorepo/docs/spring/3.2.x/spring-framework-reference/html/resources.html

like image 103
Zergleb Avatar answered Oct 21 '25 00:10

Zergleb