Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in DevOps and Agile by (120 points)

I am setting "export PORT_NUMBER=****" in ".sh" file how to use this env variable to the properties file. If I tried like this:

BaseUrl=http://localhost:${env.PORT_NUMBER}

It is not working. Please help me out.

1 Answer

0 votes
by (12.4k points)

To do this you need to prase the values and resolve any environment variables. You can get  environment variable fro java using different methods, like: 

Map<String, String> env = System.getenv();

For more information, you can read here

Interested in learning DevOps? Come & join: DevOps Certification

Related questions

Browse Categories

...