Skip to content

Commit 31d1fff

Browse files
committed
readme update
1 parent 2f8a231 commit 31d1fff

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

README.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,24 @@ public class HederaAccountService {
6565
All APIs of the client are synchronous and return the result of the operation. For asynchronous operations, you can
6666
easily wrap calls by use the [`@Async` annotation of spring](https://spring.io/guides/gs/async-method).
6767

68+
### Hedera Spring Sample
69+
70+
A sample application that uses the Hedera Spring module can be found in the `hedera-spring-sample` module.
71+
The sample application is a simple Spring Boot application that reads has a REST endpoint at `localhost:8080/` and
72+
shows the hbar balance of the account `0.0.100`.
73+
To use the application, you need to have created a Hedera testnet account at the [Hedera portal](https://portal.hedera.com/).
74+
The account information can be added to the `application.properties` file in the `hedera-spring-sample` module:
75+
```properties
76+
spring.hedera.accountId=0.0.3447271
77+
spring.hedera.privateKey=2130020100312346052b8104400304220420c236508c429395a8180b1230f436d389adc5afaa9145456783b57b2045c6cc37
78+
```
79+
80+
Alternatively, you can provide the account information as environment variables:
81+
```shell
82+
export HEDERA_ACCOUNT_ID=0.0.3447271
83+
export HEDERA_PRIVATE_KEY=2130020100312346052b8104400304220420c236508c429395a8180b1230f436d389adc5afaa9145456783b57b2045c6cc37
84+
```
85+
6886
## Microservice support
6987

7088
The support for Microprofile is still in development and can not be used yet.

0 commit comments

Comments
 (0)