Repository to run study on Microsoft Reference docs for Java
You need to run 3 tasks for this study, for each task a sample task has been provided.
# | Sample | Task |
---|---|---|
1 | Print contents of a blob in Azure Storage | Print name of all blob files in Azure Storage container |
2 | Send 10 messages to Azure Event Hub | Recieve and print messages from Azure Event Hub |
3 | Update an item in Cosmos DB (NoSQL) | Query and print top 5 items, where elevation = 0 |
Codespace has the following environment variables already set and you can acccess them from System.getenv("var_name");
COSMOS_ENDPOINT = <value>
COSMOS_DATABASE = <value>
COSMOS_CONTAINER = <value>
COSMOS_KEY = <value>
CONTAINER_NAME = <value>
AZURE_STORAGE_CONNECTION_STRING = <value>
EVENTHUB_NAME = <value>
EVENTHUB_CONNECTION_STRING = <value>
These values will be configured by your study coordinator
mvn clean
mvn install
mvn clean install
The maven build will generate a fat executable jar
java -jar target/ref-doc-study-1.0-SNAPSHOT-jar-with-dependencies.jar
If you are stuck check the solutions in the solution directory.
Replace the currents imports with imports from the solutions package, compile and run