Fix headers in Handling Bot Tokens page again

This commit is contained in:
chase 2018-09-28 22:14:00 +02:00
parent 8aa77f54eb
commit d7c5d28d45

View File

@ -16,7 +16,7 @@ Those Values are not defined in the Application and therefore are not visible in
## <a id="setting-environment-variables"></a> Setting Environment Variables ### ## <a id="setting-environment-variables"></a> Setting Environment Variables ###
###Windows ### Windows
Enviroment Variables in Windows can be set using the Console (CMD) using Enviroment Variables in Windows can be set using the Console (CMD) using
```batchfile ```batchfile
SETX [VARIABLE_NAME] [YOUR_BOT_TOKEN] SETX [VARIABLE_NAME] [YOUR_BOT_TOKEN]
@ -29,7 +29,7 @@ It can also be set using the Windows GUI
* Click Environment Variables... * Click Environment Variables...
* In the 'User Variables for X' click New and enter a Name and your Token as the Value * In the 'User Variables for X' click New and enter a Name and your Token as the Value
###Linux & Mac ### Linux & Mac
* Open the '~/.bash_profile' File * Open the '~/.bash_profile' File
* Append the following to it: * Append the following to it:
```bash ```bash
@ -38,7 +38,7 @@ export VARIABLE_NAME = {YOUR_BOT_TOKEN}
* Save the file * Save the file
* Either reboot your system or run the command above in your terminal * Either reboot your system or run the command above in your terminal
###IntelliJ ### IntelliJ
* Go to Run->Edit Configuratuions... * Go to Run->Edit Configuratuions...
* Navigate to your Java Run Configuration * Navigate to your Java Run Configuration
* Under Enviroment->Enviroment Variables click the Folder Icon * Under Enviroment->Enviroment Variables click the Folder Icon
@ -51,16 +51,16 @@ export VARIABLE_NAME = {YOUR_BOT_TOKEN}
* Enter a Name and your Token as the Value * Enter a Name and your Token as the Value
* Click the "Add" button * Click the "Add" button
## <a id="accessing-enviroment-variables"></a> Accessing Enviroment Variables ### ## <a id="accessing-enviroment-variables"></a> Accessing Enviroment Variables ##
###Java ### Java
You can access the Enviroment Variables by using System.getEnv() You can access the Enviroment Variables by using System.getEnv()
```java ```java
String BOT_TOKEN = System.getenv("VARIABLE_NAME"); String BOT_TOKEN = System.getenv("VARIABLE_NAME");
``` ```
###Spring ### Spring
In Spring the @Value annotation allows you to inject the Value into your class In Spring the @Value annotation allows you to inject the Value into your class
```java ```java