In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-25 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article describes in detail the corresponding analysis and solutions to the question of how users in SAP cloud platform CloudFoundry customize variables, hoping to help more partners who want to solve this problem to find a more simple and feasible method.
The env area in the manifest.xml of the CloudFoundry application allows users to customize variables, as shown in figure 5 below.
After deploying to CloudFoundry using cf push, you can see these five user-defined variables in the User-Provided Variables tab of SAP Cloud Platform Cockpit. New environment variables can be added directly to Cockpit by clicking the "Add Varible" button. In the following figure, I added a new environment variable named employee_id with a value of i042416.
How to read environment variables in Java code:
String userJavaEnvironment = System.getenv ("JAVA_OPTS"); LOGGER.info ("Baal user provided variable:" + userJavaEnvironment); String employee_id = System.getenv ("employee_id"); LOGGER.info ("employee_id variable:" + employee_id)
Observe the value of the runtime JAVA_OPTS output in Kibana:
"msg": "Baal user provided variable:-agentpath:/home/vcap/app/.java-buildpack/open_jdk_jre/bin/jvmkill-1.13.0_RELEASE=printHeapHistogram=1-Djava.io.tmpdir=/home/vcap/tmp-Djava.ext.dirs=/home/vcap/app/.java-buildpack/container_security_provider:/home/vcap/app/.java-buildpack/open_jdk_jre/lib/ext-Djava.security.properties=/home/vcap/app/.java-buildpack/java _ security/java.security-Xss349k-Daccess.logging.enabled=false-Dhttp.port=8080-Xmx71722K-XX:ReservedCodeCacheSize=240M-XX:MaxDirectMemorySize=10M-XX:MaxMetaspaceSize=109315K-Djdk.tls.ephemeralDHKeySize=2048-Djava.protocol.handler.pkgs=org.apache.catalina.webresources-Dorg.apache.catalina.security.SecurityListener.UMASK=0027 "
Output of employee_id:
This is the answer to the question about how to customize variables for users in SAP cloud platform CloudFoundry. I hope the above content can be of some help to you. If you still have a lot of doubts to be solved, you can follow the industry information channel for more related knowledge.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 280
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.