We need a new Spring controller to be implemented that returns a list of the environment variables and system properties used to launch the application.
/configuration/environment/info web resource pathEnvironmentInfoControllerstrongbox-web-core under the org.carlspring.strongbox.controllers@PreAuthorize("hasAuthority('ADMIN')")We need a proper test case for this.
curl -H "Accept: application/json" -X GET http://localhost:48080/configuration/environment/info
{
"environment": [
{
"name": "JAVA_HOME",
"value": "/java/jdk1.8.0_151"
},
{
"name": "M2_HOME",
"value": "/java/apache/maven-3.3.9"
}
......
],
"system": [
{
"name": "logging.dir",
"value": "/path/to/logs"
},
{
"name": "java.io.tmpdir",
"value": "/path/to/tmp"
},
....
]
}
Hello @carlspring. I've been reading the wiki and I'd like to help with this issue you opened.
Hi @ptirador ,
This is great! Please, feel free to pick this task and create a pull for it!
Kind regards,
Martin
Hi again @carlspring, I'd like to ask you a question:
Is it necessary to return a 400 status code if any of the lists (env variables or system props) is empty?
It's highly unlikely that the server will have been started without any system, or environment variables, as we're always setting some. Also, part of the system variables are already exported before we run it, so, there'll definitely be some of both. :)
Thanks for implementing this! :)