test: Integration tests outline
This commit is contained in:
parent
2f7e706548
commit
2981691ffc
6 changed files with 191 additions and 2 deletions
8
src/main/java/eu/ztsh/wymiana/config/NbpProperties.java
Normal file
8
src/main/java/eu/ztsh/wymiana/config/NbpProperties.java
Normal file
|
@ -0,0 +1,8 @@
|
|||
package eu.ztsh.wymiana.config;
|
||||
|
||||
import org.springframework.boot.context.properties.ConfigurationProperties;
|
||||
|
||||
@ConfigurationProperties("nbp")
|
||||
public record NbpProperties(String baseurl) {
|
||||
|
||||
}
|
|
@ -8,9 +8,9 @@ import org.springframework.web.client.RestClient;
|
|||
public class RestClientConfiguration {
|
||||
|
||||
@Bean
|
||||
public RestClient restClient() {
|
||||
public RestClient restClient(NbpProperties nbpProperties) {
|
||||
return RestClient.builder()
|
||||
.baseUrl("http://api.nbp.pl")
|
||||
.baseUrl(nbpProperties.baseurl())
|
||||
.defaultHeader("Accept", "application/json")
|
||||
.build();
|
||||
}
|
||||
|
|
|
@ -2,6 +2,9 @@ hsqldb:
|
|||
name: db
|
||||
port: 9090
|
||||
|
||||
nbp:
|
||||
baseurl: "http://api.nbp.pl"
|
||||
|
||||
spring:
|
||||
datasource:
|
||||
username: sa
|
||||
|
@ -11,3 +14,12 @@ spring:
|
|||
jpa:
|
||||
hibernate:
|
||||
ddl-auto: create
|
||||
|
||||
management:
|
||||
endpoints:
|
||||
jmx:
|
||||
exposure:
|
||||
exclude: '*'
|
||||
web:
|
||||
exposure:
|
||||
include: health
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue