|
Last change
on this file was 81cdf2d, checked in by Nikola Janev <nikolajanev57@…>, 10 days ago |
|
initial commit
|
-
Property mode
set to
100644
|
|
File size:
509 bytes
|
| Line | |
|---|
| 1 | package com.nikola.web3ednevnikbackend.config.web3;
|
|---|
| 2 |
|
|---|
| 3 | import org.springframework.beans.factory.annotation.Value;
|
|---|
| 4 | import org.springframework.context.annotation.Bean;
|
|---|
| 5 | import org.springframework.context.annotation.Configuration;
|
|---|
| 6 | import org.web3j.protocol.Web3j;
|
|---|
| 7 | import org.web3j.protocol.http.HttpService;
|
|---|
| 8 |
|
|---|
| 9 | @Configuration
|
|---|
| 10 | public class Web3Config {
|
|---|
| 11 | @Value("${infura.url}")
|
|---|
| 12 | private String infuraUrl;
|
|---|
| 13 |
|
|---|
| 14 | @Bean
|
|---|
| 15 | public Web3j Web3Config() {
|
|---|
| 16 | return Web3j.build(new HttpService(infuraUrl));
|
|---|
| 17 | }
|
|---|
| 18 | }
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.