4

We have jersey maven application. And want to build for the different environment using profiles in the application. The structure is like -

Project 
   -src
   -resource
   -profiles
       |
       |-dev
          |-config.properties

       |-test
          |-config.properties.

Added profiles in pom.xml

Now it's working fine.

But not able to access the variable's values from config.properties file into Java code files. The variables contain the credentials or data specific to the environment.

Please tell me how can I access the variable from config.properties file.

2
  • 1
    Is there any solution to read values from config.property file in the java class.
    – Shavareppa
    Aug 22, 2018 at 4:53
  • did you get any solution for this? I am looking to build java jersey application with configs for different environments. Jan 24, 2019 at 4:11

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.